[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 2 Feb 2021 12:17:07 +0100
From: Greg KH <gregkh@...uxfoundation.org>
To: Avri Altman <avri.altman@....com>
Cc: "James E . J . Bottomley" <jejb@...ux.vnet.ibm.com>,
"Martin K . Petersen" <martin.petersen@...cle.com>,
linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
Bart Van Assche <bvanassche@....org>,
yongmyung lee <ymhungry.lee@...sung.com>,
Daejun Park <daejun7.park@...sung.com>,
alim.akhtar@...sung.com, asutoshd@...eaurora.org,
Zang Leigang <zangleigang@...ilicon.com>,
Avi Shchislowski <avi.shchislowski@....com>,
Bean Huo <beanhuo@...ron.com>, cang@...eaurora.org,
stanley.chu@...iatek.com
Subject: Re: [PATCH v2 9/9] scsi: ufshpb: Make host mode parameters
configurable
On Tue, Feb 02, 2021 at 10:30:07AM +0200, Avri Altman wrote:
> We can make use of this commit, to elaborate some more of the host
> control mode logic, explaining what role play each and every variable:
>
> - activation_thld - In host control mode, reads are the major source of
> activation trials. once this threshold hs met, the region is added
> to the "to-be-activated" list. Since we reset the read counter upon
> write, this include sending a rb command updating the region ppn as
> well.
>
> - normalization_factor - We think of the regions as "buckets". Those
> buckets are being filled with reads, and emptied on write. We use
> entries_per_srgn - the amount of blocks in a subregion as our bucket
> size. This applies because HPB1.0 only concern a single-block
> reads. Once the bucket size is crossed, we trigger a normalization
> work - not only to avoid overflow, but mainly because we want to
> keep those counters normalized, as we are using those reads as a
> comparative score, to make various decisions. The normalization is
> dividing (shift right) the read counter by the normalization_factor.
> If during consecutive normalizations an active region has exhaust
> its reads - inactivate it.
>
> - eviction_thld_enter - Region deactivation is often due to the fact
> that eviction took place: a region become active on the expense of
> another. This is happening when the max-active-regions limit has
> crossed. In host mode, eviction is considered an extreme measure.
> We want to verify that the entering region has enough reads, and the
> exiting region has much less reads. eviction_thld_enter is the min
> reads that a region must have in order to be considered as a
> candidate to evict other region.
>
> - eviction_thld_exit - same as above for the exiting region. A region
> is consider to be a candidate to be evicted, only if it has less
> reads than eviction_thld_exit.
>
> - read_timeout_ms - In order not to hang on to “cold” regions, we
> shall inactivate a region that has no READ access for a predefined
> amount of time - read_timeout_ms. If read_timeout_ms has expired,
> and the region is dirty - it is less likely that we can make any
> use of HPB-READing it. So we inactivate it. Still, deactivation
> has its overhead, and we may still benefit from HPB-READing this
> region if it is clean - see read_timeout_expiries.
>
> - read_timeout_expiries - if the region read timeout has expired, but
> the region is clean, just re-wind its timer for another spin. Do
> that as long as it is clean and did not exhaust its
> read_timeout_expiries threshold.
>
> - timeout_polling_interval_ms - the frequency in which the delayed
> worker that checks the read_timeouts is awaken.
You create new sysfs files, but fail to document them in
Documentation/ABI/ which is where the above information needs to go :(
thanks,
greg k-h
Powered by blists - more mailing lists