linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bean Huo <huobean@gmail.com>
To: Bart Van Assche <bvanassche@acm.org>,
	alim.akhtar@samsung.com, avri.altman@wdc.com,
	asutoshd@codeaurora.org, jejb@linux.ibm.com,
	martin.petersen@oracle.com, stanley.chu@mediatek.com,
	beanhuo@micron.com, tomas.winkler@intel.com, cang@codeaurora.org,
	rdunlap@infradead.org
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	hch@infradead.org
Subject: Re: [RESENT PATCH RFC v3 5/5] scsi: ufs: UFS Host Performance Booster(HPB) driver
Date: Fri, 08 May 2020 16:44:57 +0200	[thread overview]
Message-ID: <1edda80d569a53e0af28fbe30a367d84f099f8fe.camel@gmail.com> (raw)
In-Reply-To: <7b3e127f-a25f-e821-6704-2680ea619c6d@acm.org>

On Thu, 2020-05-07 at 20:21 -0700, Bart Van Assche wrote:
> On 2020-05-04 07:20, huobean@gmail.com wrote:
> > +config SCSI_UFSHPB
> > +	bool "UFS Host Performance Booster (EXPERIMENTAL)"
> > +	depends on SCSI_UFSHCD
> > +	[ ... ]
> > +
> > +config UFSHPB_MAX_MEM_SIZE
> > +	int "UFS HPB maximum memory size per controller (in MiB)"
> > +	depends on SCSI_UFSHPB
> > +	default 128
> > +	range 0 65536
> > +	[ ... ]
> 
> Kernel module parameters are an inflexible mechanism because the
> value
> of these parameters cannot be changed without rebuilding the kernel
> followed by a reboot. Has it been considered to make these two
> parameters configurable through sysfs? Has it been considered to make
> these parameters UFS device parameters instead of global parameters
> that
> apply to all UFS devices?
> 
> 
Hi Bart
I ever tried these two approaches. let me explain why I finally choose
kernel module "make menuconfig" way.

1: driver module parameter, while system booting, specify maximum HPB
cache size in kernel boot Parameters:

   	static int max_hpb_mem = 128;
   	module_param(max_hpb_mem,int,0444);

but this paramter is added in the ufshcd.c since the ufshpb.c is not a 
independent module. looks not very natural.


2: sysfs parameters

This is a feasible option. we can enable HPB after system boot up,
also, change the HPB cache maximum size.
this is the same with the current way, moreover, we don't want user to
change HPB cache size while HPB is running.


If you prefer to convert current HPB driver to be a kernel module
driver, I prefer first apporach.


thanks,

Bean







  reply	other threads:[~2020-05-08 14:45 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04 14:20 [RESENT PATCH RFC v3 0/5] scsi: ufs: add UFS Host Performance Booster(HPB) support huobean
2020-05-04 14:20 ` [RESENT PATCH RFC v3 1/5] scsi; ufs: add device descriptor for Host Performance Booster huobean
2020-05-08  0:59   ` Bart Van Assche
2020-05-08  9:09     ` Bean Huo
2020-05-04 14:20 ` [RESENT PATCH RFC v3 2/5] scsi: ufs: make ufshcd_read_unit_desc_param() non-static func huobean
2020-05-04 14:20 ` [RESENT PATCH RFC v3 3/5] scsi: ufs: add ufs_features parameter in structure ufs_dev_info huobean
2020-05-08  1:02   ` Bart Van Assche
2020-05-08  9:15     ` Bean Huo
2020-05-04 14:20 ` [RESENT PATCH RFC v3 4/5] scsi: ufs: add unit and geometry parameters for HPB huobean
2020-05-08  1:04   ` Bart Van Assche
2020-05-08 10:15     ` Bean Huo
2020-05-04 14:20 ` [RESENT PATCH RFC v3 5/5] scsi: ufs: UFS Host Performance Booster(HPB) driver huobean
2020-05-08  1:34   ` Randy Dunlap
2020-05-08 10:08     ` Bean Huo
2020-05-08  3:21   ` Bart Van Assche
2020-05-08 14:44     ` Bean Huo [this message]
2020-05-08 20:11       ` Bart Van Assche
2020-05-08 11:38   ` Avri Altman
2020-05-08 12:15     ` Bean Huo
2020-05-08 14:26     ` Alim Akhtar
2020-05-08 14:59       ` Bean Huo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1edda80d569a53e0af28fbe30a367d84f099f8fe.camel@gmail.com \
    --to=huobean@gmail.com \
    --cc=alim.akhtar@samsung.com \
    --cc=asutoshd@codeaurora.org \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=cang@codeaurora.org \
    --cc=hch@infradead.org \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=rdunlap@infradead.org \
    --cc=stanley.chu@mediatek.com \
    --cc=tomas.winkler@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).