RE: [PATCH 3/8] scsi: ufshpb: Add region's reads counter

2021-02-01 Thread Avri Altman
> On Mon, Feb 01, 2021 at 08:17:59AM +, Avri Altman wrote: > > > > > > On Mon, Feb 01, 2021 at 07:51:19AM +, Avri Altman wrote: > > > > > > > > > > On Mon, Feb 01, 2021 at 07:12:53AM +, Avri Altman wrote: > > > > > > > > +#define WORK_PENDING 0 > > > > > > > > +#define ACTIVATION_THRS

Re: [PATCH 3/8] scsi: ufshpb: Add region's reads counter

2021-02-01 Thread gre...@linuxfoundation.org
On Mon, Feb 01, 2021 at 08:17:59AM +, Avri Altman wrote: > > > > On Mon, Feb 01, 2021 at 07:51:19AM +, Avri Altman wrote: > > > > > > > > On Mon, Feb 01, 2021 at 07:12:53AM +, Avri Altman wrote: > > > > > > > +#define WORK_PENDING 0 > > > > > > > +#define ACTIVATION_THRSHLD 4 /* 4 IOs

RE: [PATCH 3/8] scsi: ufshpb: Add region's reads counter

2021-02-01 Thread Avri Altman
> > On Mon, Feb 01, 2021 at 07:51:19AM +, Avri Altman wrote: > > > > > > On Mon, Feb 01, 2021 at 07:12:53AM +, Avri Altman wrote: > > > > > > +#define WORK_PENDING 0 > > > > > > +#define ACTIVATION_THRSHLD 4 /* 4 IOs */ > > > > > Rather than fixing it with macro, how about using sysfs and

Re: [PATCH 3/8] scsi: ufshpb: Add region's reads counter

2021-02-01 Thread gre...@linuxfoundation.org
On Mon, Feb 01, 2021 at 07:51:19AM +, Avri Altman wrote: > > > > On Mon, Feb 01, 2021 at 07:12:53AM +, Avri Altman wrote: > > > > > +#define WORK_PENDING 0 > > > > > +#define ACTIVATION_THRSHLD 4 /* 4 IOs */ > > > > Rather than fixing it with macro, how about using sysfs and make it > > >

RE: [PATCH 3/8] scsi: ufshpb: Add region's reads counter

2021-01-31 Thread Avri Altman
> > On Mon, Feb 01, 2021 at 07:12:53AM +, Avri Altman wrote: > > > > +#define WORK_PENDING 0 > > > > +#define ACTIVATION_THRSHLD 4 /* 4 IOs */ > > > Rather than fixing it with macro, how about using sysfs and make it > > > configurable? > > Yes. > > I will add a patch making all the logic conf

Re: [PATCH 3/8] scsi: ufshpb: Add region's reads counter

2021-01-31 Thread gre...@linuxfoundation.org
On Mon, Feb 01, 2021 at 07:12:53AM +, Avri Altman wrote: > > > +#define WORK_PENDING 0 > > > +#define ACTIVATION_THRSHLD 4 /* 4 IOs */ > > Rather than fixing it with macro, how about using sysfs and make it > > configurable? > Yes. > I will add a patch making all the logic configurable. > As al

RE: [PATCH 3/8] scsi: ufshpb: Add region's reads counter

2021-01-31 Thread Avri Altman
> > +#define WORK_PENDING 0 > > +#define ACTIVATION_THRSHLD 4 /* 4 IOs */ > Rather than fixing it with macro, how about using sysfs and make it > configurable? Yes. I will add a patch making all the logic configurable. As all those are hpb-related parameters, I think module parameters are more ade

RE: [PATCH 3/8] scsi: ufshpb: Add region's reads counter

2021-01-31 Thread Daejun Park
Hi Avri, Thanks for adding HCM support on HPB. I have some opinion for this patch. > +#define WORK_PENDING 0 > +#define ACTIVATION_THRSHLD 4 /* 4 IOs */ Rather than fixing it with macro, how about using sysfs and make it configurable? > @@ -306,12 +325,39 @@ void ufshpb_prep(struct ufs_hba *hba,

Re: [PATCH 3/8] scsi: ufshpb: Add region's reads counter

2021-01-30 Thread Greg KH
On Sun, Jan 31, 2021 at 07:25:37AM +, Avri Altman wrote: > > > > > > + if (ufshpb_mode == HPB_HOST_CONTROL) > > > + reads = atomic64_inc_return(&rgn->reads); > > > + > > > if (!ufshpb_is_support_chunk(transfer_len)) > > > return; > > > > > > + if (ufshpb_

RE: [PATCH 3/8] scsi: ufshpb: Add region's reads counter

2021-01-30 Thread Avri Altman
> > > > + if (ufshpb_mode == HPB_HOST_CONTROL) > > + reads = atomic64_inc_return(&rgn->reads); > > + > > if (!ufshpb_is_support_chunk(transfer_len)) > > return; > > > > + if (ufshpb_mode == HPB_HOST_CONTROL) { > > + /* > > + * in host

Re: [PATCH 3/8] scsi: ufshpb: Add region's reads counter

2021-01-27 Thread Greg KH
On Wed, Jan 27, 2021 at 05:12:12PM +0200, Avri Altman wrote: > In host control mode, reads are the major source of activation trials. > Keep track of those reads counters, for both active as well inactive > regions. > > We reset the read counter upon write - we are only interested in "clean" > rea