Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp208514pxb; Tue, 2 Feb 2021 03:14:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJwW0N6Zi9HRPQWBjdRilWXhXAY1RLR24ExQCrInUUiTE8KQSwI7mg0l+Yp9Z9i0kanawd21 X-Received: by 2002:aa7:c78e:: with SMTP id n14mr2616277eds.31.1612264455964; Tue, 02 Feb 2021 03:14:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612264455; cv=none; d=google.com; s=arc-20160816; b=Oegujl09dzDzGVXKxAqNBnnMq3EFVjtQkY+NoFINo5ZM+lGWNrZRB1IK5L2IOqh3J+ liQZgQ6yTSRuk65EEQXhjmOH0mkwu+AQEGp7ohAmD31t6J8ojkyvDzIzWoBTXkoFMPbE Px4iRRQgLVvc6tLvpVHlgpcFmIi3dAmtDxx6ehKe7f6C1bko/+Wrx5FMyg93zMH8yFK8 TqtiA1hKL7qtokZms+vTogomMEH9DieGsXYlNHZngg83X4dmG8DSPAp8ONeGGwdmaYXI fL+pul+EVV79R9ECzPLkxCJir8bMn18Dus4X4+Hi2oqIRKtEA6DvnCwEFWAL0HuI7ft7 slaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=oBWeR8X45BNiZcqkoKfFDxBtYQJayug6TtZM6b0SYgU=; b=pEPVQjdT10A3MBYJGjx0F/IeaLIBMVT9TI+bHFP2nNqGJsVjn1dHwyAw+H3v71YGhR jo6Toz0D098+XN7wXd0dvP6lCFuWH/LobjM+xJe+/1hLhT47RQhBuVdV5dVdVcI9zhDj XBC+L+jzfGfMsHv6Wch6VsG1dzhJ3g1Gecw9Nb9L3daInEZl/wzsJo4jtTjayq6obCTi LuF+MVPXZNOirO4gcpgGtK/iWDcgkjlst7AcyoS8a6FVbaFpWm9Zu2O+zdxbQUfCir8S KketAO2xxM7pfGzs68pxfNMQ3ELsiLDRn/8dFA+pk0PRmBEVaaREMRv8DbfaVmnOi6fi LOjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=POeleXDM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e17si12017374ejr.533.2021.02.02.03.13.50; Tue, 02 Feb 2021 03:14:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=POeleXDM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230165AbhBBLNM (ORCPT + 99 others); Tue, 2 Feb 2021 06:13:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:56078 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230073AbhBBLNI (ORCPT ); Tue, 2 Feb 2021 06:13:08 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5BBA464E31; Tue, 2 Feb 2021 11:12:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612264348; bh=vHI7p08V2NUSHBNsPQcfDGdq5KHMXE1sVgvKoHPTqNk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=POeleXDMPfS7RAz68GaJjL/+ulxVZfeEfXWWYyApI8pHjcSagO1sQfHV8L5OcV5k/ H+VGOiGpAQQbxwDJCJCzZHocIJwLgz4KFt5JR19I2mwgpLToq2e6BWb/eluu8bzcpm Dyjr/pOA0LyQdw0dgIF3lrjEGV87xWIT2sEd8Suo= Date: Tue, 2 Feb 2021 12:12:23 +0100 From: Greg KH To: Avri Altman Cc: "daejun7.park@samsung.com" , "jejb@linux.ibm.com" , "martin.petersen@oracle.com" , "asutoshd@codeaurora.org" , "stanley.chu@mediatek.com" , "cang@codeaurora.org" , "huobean@gmail.com" , "bvanassche@acm.org" , ALIM AKHTAR , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Sung-Jun Park , yongmyung lee , Jinyoung CHOI , BoRam Shin , SEUNGUK SHIN Subject: Re: [PATCH v19 1/3] scsi: ufs: Introduce HPB feature Message-ID: References: <20210129052848epcms2p6e5797efd94e6282b76ad9ae6c99e3ab5@epcms2p6> <20210129052936epcms2p136a2ae69803ca399c99e815e1244779a@epcms2p1> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 02, 2021 at 07:46:47AM +0000, Avri Altman wrote: > Daejun, > > > static const struct attribute_group *ufshcd_driver_groups[] = { > > &ufs_sysfs_unit_descriptor_group, > > &ufs_sysfs_lun_attributes_group, > > +#ifdef CONFIG_SCSI_UFS_HPB > > + &ufs_sysfs_hpb_stat_group, > > +#endif > > NULL, > > }; > Aren’t you creating a hpb_stats entries for every lun (even wlun)? > This is confusing, even if safe (any non-hpb lun returns NODEV). > Also user-space have no way to know which entry is valid. > > Can we group those under ufshpb_lu for valid hpb luns only? How do you determine a valid lun? If the kernel knows, then it should just not create the files for any that is "invalid", which it can do by setting the correct mode in the attribute group. > Also need to document the stats? Maybe in a separate sysfs-driver-ufs-features? Aren't they all documented in the Documentation/ABI/testing/sysfs-driver-ufs file in this patch? What is missing? thanks, greg k-h