>On 2021-03-15 15:23, Can Guo wrote:
>> On 2021-03-15 15:07, Daejun Park wrote:
>>>>> This patch supports the HPB 2.0.
>>>>>
>>>>> The HPB 2.0 supports read of varying sizes from 4KB to 512KB.
>>>>> In the case of Read (<
>> >> ---
>> >> drivers/scsi/ufs/ufshpb.c | 14 ++
>> >> drivers/scsi/ufs/ufshpb.h | 1 +
>> >> 2 files changed, 15 insertions(+)
>> >>
>> >> diff --git a/drivers/scsi/ufs/ufshpb.c b/drivers/scsi/ufs/ufshpb.c
>> >> index 6f4fd22eaf2f..0744feb4d484 100644
Unlike other query APIs in UFS, ufshcd_query_flag has a fixed selector
as 0. This patch allows ufshcd_query_flag API to choose selector value
by parameter.
Signed-off-by: Daejun Park
---
drivers/scsi/ufs/ufs-sysfs.c | 2 +-
drivers/scsi/ufs/ufshcd.c| 29
>> >> ---
>> >> drivers/scsi/ufs/ufshpb.c | 14 ++
>> >> drivers/scsi/ufs/ufshpb.h | 1 +
>> >> 2 files changed, 15 insertions(+)
>> >>
>> >> diff --git a/drivers/scsi/ufs/ufshpb.c b/drivers/scsi/ufs/ufshpb.c
>> >> index 6f4fd22eaf2f..0744feb4d484 100644
>> >> ---
>> ---
>> drivers/scsi/ufs/ufshpb.c | 14 ++
>> drivers/scsi/ufs/ufshpb.h | 1 +
>> 2 files changed, 15 insertions(+)
>>
>> diff --git a/drivers/scsi/ufs/ufshpb.c b/drivers/scsi/ufs/ufshpb.c
>> index 6f4fd22eaf2f..0744feb4d484 100644
>> ---
Hi Martin
>
>Daejun,
>
>> Unlike other query APIs in UFS, ufshcd_query_flag has a fixed selector
>> as 0. This patch allows ufshcd_query_flag API to choose selector value
>> by parameter.
>
>I don't see any users of the added parameter. Am I missing something?
The JEDEC standard describes it
formance improvement of 58 - 67% for random read
workload. [1]
[1]:
https://www.usenix.org/conference/hotstorage17/program/presentation/jeong
Daejun Park (4):
scsi: ufs: Introduce HPB feature
scsi: ufs: L2P map management for HPB read
scsi: ufs: Prepare HPB read for cached sub-region
scsi: ufs: Ad
-by: kernel test robot
Signed-off-by: Daejun Park
---
Documentation/ABI/testing/sysfs-driver-ufs | 127 +
drivers/scsi/ufs/Kconfig | 9 +
drivers/scsi/ufs/Makefile | 1 +
drivers/scsi/ufs/ufs-sysfs.c | 18 +
drivers/scsi/ufs/ufs.h
PPN.
The write buffer commands may not be issued immediately due to busy tags.
To use HPB read more aggressively, the driver can requeue the write buffer
command. The requeue threshold is implemented as timeout and can be
modified with requeue_timeout_ms entry in sysfs.
Signed-off-by: Daejun P
d-by: Bean Huo
Signed-off-by: Daejun Park
---
drivers/scsi/ufs/ufs.h| 36 ++
drivers/scsi/ufs/ufshcd.c |4 +
drivers/scsi/ufs/ufshpb.c | 1088 -
drivers/scsi/ufs/ufshpb.h | 65 +++
4 files changed, 1178 insertions(+), 15 deletions(-)
diff --git
Huo
Signed-off-by: Daejun Park
---
drivers/scsi/ufs/ufshcd.c | 2 +
drivers/scsi/ufs/ufshpb.c | 257 +-
drivers/scsi/ufs/ufshpb.h | 2 +
3 files changed, 258 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
PPN.
The write buffer commands may not be issued immediately due to busy tags.
To use HPB read more aggressively, the driver can requeue the write buffer
command. The requeue threshold is implemented as timeout and can be
modified with requeue_timeout_ms entry in sysfs.
Signed-off-by: Daejun P
d-by: Bean Huo
Signed-off-by: Daejun Park
---
drivers/scsi/ufs/ufs.h| 36 ++
drivers/scsi/ufs/ufshcd.c |4 +
drivers/scsi/ufs/ufshpb.c | 1088 -
drivers/scsi/ufs/ufshpb.h | 65 +++
4 files changed, 1178 insertions(+), 15 deletions(-)
diff --git
Huo
Signed-off-by: Daejun Park
---
drivers/scsi/ufs/ufshcd.c | 2 +
drivers/scsi/ufs/ufshpb.c | 257 +-
drivers/scsi/ufs/ufshpb.h | 2 +
3 files changed, 258 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
-by: kernel test robot
Signed-off-by: Daejun Park
---
Documentation/ABI/testing/sysfs-driver-ufs | 127 +
drivers/scsi/ufs/Kconfig | 9 +
drivers/scsi/ufs/Makefile | 1 +
drivers/scsi/ufs/ufs-sysfs.c | 18 +
drivers/scsi/ufs/ufs.h
through ufshpb_map
request. For the in-active region, the HPB discards the L2P map.
When a write I/O occurs in an active sub-region area, associated dirty
bitmap checked as dirty for preventing stale read.
HPB is shown to have a performance improvement of 58 - 67% for random read
workload.
Hi Avri,
>> +static int ufshpb_execute_umap_req(struct ufshpb_lu *hpb,
>> + struct ufshpb_req *umap_req,
>> + struct ufshpb_region *rgn)
>> +{
>> + struct request *req;
>> + struct scsi_request *rq;
>> +
>> + req
Hi Bean,
>On Mon, 2021-03-22 at 15:54 +0900, Daejun Park wrote:
>> + switch (rsp_field->hpb_op) {
>>
>> + case HPB_RSP_REQ_REGION_UPDATE:
>>
>> + if (data_seg_len != DEV_DATA_SEG_LEN)
>>
>> +
t; > as a module parameter, so that it can be configurable by the user.
>>> >
>>> > To gurantee a minimum memory pool size of 4MB:
>>> > ufshpb_host_map_kbytes=4096
>>> >
>>> > The map_work manages active/inactive by 2 "to-do" list
d-by: Bean Huo
Signed-off-by: Daejun Park
---
drivers/scsi/ufs/ufs.h| 36 ++
drivers/scsi/ufs/ufshcd.c |4 +
drivers/scsi/ufs/ufshpb.c | 1094 -
drivers/scsi/ufs/ufshpb.h | 65 +++
4 files changed, 1184 insertions(+), 15 deletions(-)
diff --git
Huo
Signed-off-by: Daejun Park
---
drivers/scsi/ufs/ufshcd.c | 2 +
drivers/scsi/ufs/ufshpb.c | 256 +-
drivers/scsi/ufs/ufshpb.h | 2 +
3 files changed, 257 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
-by: kernel test robot
Signed-off-by: Daejun Park
---
Documentation/ABI/testing/sysfs-driver-ufs | 127 +
drivers/scsi/ufs/Kconfig | 9 +
drivers/scsi/ufs/Makefile | 1 +
drivers/scsi/ufs/ufs-sysfs.c | 18 +
drivers/scsi/ufs/ufs.h
rovement of 58 - 67% for random read
workload. [1]
[1]:
https://www.usenix.org/conference/hotstorage17/program/presentation/jeong
Daejun Park (4):
scsi: ufs: Introduce HPB feature
scsi: ufs: L2P map management for HPB read
scsi: ufs: Prepare HPB read for cached sub-region
scsi: ufs: Ad
nting stale read.
HPB is shown to have a performance improvement of 58 - 67% for random read
workload. [1]
[1]:
https://www.usenix.org/conference/hotstorage17/program/presentation/jeong
Daejun Park (4):
scsi: ufs: Introduce HPB feature
scsi: ufs: L2P map management for HPB read
scsi: ufs
PPN.
The write buffer commands may not be issued immediately due to busy tags.
To use HPB read more aggressively, the driver can requeue the write buffer
command. The requeue threshold is implemented as timeout and can be
modified with requeue_timeout_ms entry in sysfs.
Signed-off-by: Daejun P
d-by: Bean Huo
Signed-off-by: Daejun Park
---
drivers/scsi/ufs/ufs.h| 36 ++
drivers/scsi/ufs/ufshcd.c |4 +
drivers/scsi/ufs/ufshpb.c | 1094 -
drivers/scsi/ufs/ufshpb.h | 65 +++
4 files changed, 1184 insertions(+), 15 deletions(-)
diff --git
Huo
Signed-off-by: Daejun Park
---
drivers/scsi/ufs/ufshcd.c | 2 +
drivers/scsi/ufs/ufshpb.c | 256 +-
drivers/scsi/ufs/ufshpb.h | 2 +
3 files changed, 257 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
PPN.
The write buffer commands may not be issued immediately due to busy tags.
To use HPB read more aggressively, the driver can requeue the write buffer
command. The requeue threshold is implemented as timeout and can be
modified with requeue_timeout_ms entry in sysfs.
Signed-off-by: Daejun P
-by: kernel test robot
Signed-off-by: Daejun Park
---
Documentation/ABI/testing/sysfs-driver-ufs | 127 +
drivers/scsi/ufs/Kconfig | 9 +
drivers/scsi/ufs/Makefile | 1 +
drivers/scsi/ufs/ufs-sysfs.c | 18 +
drivers/scsi/ufs/ufs.h
>On 2021-03-17 09:42, Daejun Park wrote:
>>> On 2021-03-15 15:23, Can Guo wrote:
>>>> On 2021-03-15 15:07, Daejun Park wrote:
>>>>>>> This patch supports the HPB 2.0.
>>>>>>>
>>>>>>> The HPB 2.0 supports read
>On 2021-03-18 10:02, Daejun Park wrote:
>>> On 2021-03-17 09:42, Daejun Park wrote:
>>>>> On 2021-03-15 15:23, Can Guo wrote:
>>>>>> On 2021-03-15 15:07, Daejun Park wrote:
>>>>>>>>> This patch supports the HPB 2.0.
>>&
>On 2021-03-18 10:02, Daejun Park wrote:
>>> On 2021-03-17 09:42, Daejun Park wrote:
>>>>> On 2021-03-15 15:23, Can Guo wrote:
>>>>>> On 2021-03-15 15:07, Daejun Park wrote:
>>>>>>>>> This patch supports the HPB 2.0.
>>&
Hi Avri,
> diff --git a/drivers/scsi/ufs/ufshpb.c b/drivers/scsi/ufs/ufshpb.c
> index cf704b82e72a..f33aa28e0a0a 100644
> --- a/drivers/scsi/ufs/ufshpb.c
> +++ b/drivers/scsi/ufs/ufshpb.c
> @@ -642,7 +642,8 @@ int ufshpb_prep(struct ufs_hba *hba, struct ufshcd_lrb
> *lrbp)
> if
Hi Avri,
> +static void ufshpb_normalization_work_handler(struct work_struct *work)
> +{
> +struct ufshpb_lu *hpb;
> +int rgn_idx;
> +
> +hpb = container_of(work, struct ufshpb_lu,
> ufshpb_normalization_work);
> +
> +for (rgn_idx = 0; rgn_idx < hpb->rgns_per_lu;
Hi Avri,
> +static void ufshpb_read_to_handler(struct work_struct *work)
> +{
> +struct delayed_work *dwork = to_delayed_work(work);
> +struct ufshpb_lu *hpb;
> +struct victim_select_info *lru_info;
> +struct ufshpb_region *rgn;
> +unsigned long flags;
> +
Hi Avri,
> >
> > Hi Avri,
> >
> > > +static void ufshpb_read_to_handler(struct work_struct *work)
> > > +{
> > > +struct delayed_work *dwork = to_delayed_work(work);
> > > +struct ufshpb_lu *hpb;
> > > +struct victim_select_info *lru_info;
> > > +struct
Huo
Signed-off-by: Daejun Park
---
drivers/scsi/ufs/ufshcd.c | 2 +
drivers/scsi/ufs/ufshpb.c | 253 +-
drivers/scsi/ufs/ufshpb.h | 2 +
3 files changed, 254 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
PPN.
The write buffer commands may not be issued immediately due to busy tags.
To use HPB read more aggressively, the driver can requeue the write buffer
command. The requeue threshold is implemented as timeout and can be
modified with requeue_timeout_ms entry in sysfs.
Signed-off-by: Daejun P
d-by: Bean Huo
Signed-off-by: Daejun Park
---
drivers/scsi/ufs/ufs.h| 36 ++
drivers/scsi/ufs/ufshcd.c |4 +
drivers/scsi/ufs/ufshpb.c | 1091 -
drivers/scsi/ufs/ufshpb.h | 65 +++
4 files changed, 1181 insertions(+), 15 deletions(-)
diff --git
-by: kernel test robot
Signed-off-by: Daejun Park
---
Documentation/ABI/testing/sysfs-driver-ufs | 127 +
drivers/scsi/ufs/Kconfig | 9 +
drivers/scsi/ufs/Makefile | 1 +
drivers/scsi/ufs/ufs-sysfs.c | 18 +
drivers/scsi/ufs/ufs.h
ndom read
workload. [1]
[1]:
https://www.usenix.org/conference/hotstorage17/program/presentation/jeong
Daejun Park (4):
scsi: ufs: Introduce HPB feature
scsi: ufs: L2P map management for HPB read
scsi: ufs: Prepare HPB read for cached sub-region
scsi: ufs: Add HPB 2.0 supp
> >
> > +void ufshpb_init(struct ufs_hba *hba)
> > +{
> > +struct ufshpb_dev_info *hpb_dev_info = >ufshpb_dev;
> > +int try;
> > +int ret;
> > +
> > +if (!ufshpb_is_allowed(hba))
> > +return;
> > +
>
> Here it is better to check
> > +static int ufshpb_init_mem_wq(void)
> > +{
> > + int ret;
> > + unsigned int pool_size;
> > +
> > + ufshpb_mctx_cache = kmem_cache_create("ufshpb_mctx_cache",
> > + sizeof(struct
> > ufshpb_map_ctx),
> > +
Hi Bean,
> > +
> > +static inline int ufshpb_get_read_id(struct ufshpb_lu *hpb)
> > +{
> > + if (++hpb->cur_read_id >= MAX_HPB_READ_ID)
> > + hpb->cur_read_id = 0;
> > + return hpb->cur_read_id;
> > +}
> > +
> > +static int ufshpb_execute_pre_req(struct ufshpb_lu *hpb,
Hi Bean,
> > +
> > +static inline void ufshpb_put_pre_req(struct ufshpb_lu *hpb,
> > + struct ufshpb_req *pre_req)
> > +{
> > + pre_req->req = NULL;
> > + pre_req->bio = NULL;
> > + list_add_tail(_req->list_req, >lh_pre_req_free);
> > +
Hi, Can Guo
> > diff --git a/drivers/scsi/ufs/ufs-sysfs.c
> > b/drivers/scsi/ufs/ufs-sysfs.c
> > index 2546e7a1ac4f..00fb519406cf 100644
> > --- a/drivers/scsi/ufs/ufs-sysfs.c
> > +++ b/drivers/scsi/ufs/ufs-sysfs.c
> > @@ -841,6 +841,7 @@ out:
> > +bool ufshpb_is_legacy(struct ufs_hba *hba)
> > +{
> > +return hba->ufshpb_dev.is_legacy;
> > +}
> > +
> > static struct ufshpb_lu *ufshpb_get_hpb_data(struct scsi_device *sdev)
> > {
> > return sdev->hostdata;
> > @@ -64,9 +69,19 @@ static bool
> > @@ -1812,8 +2307,9 @@ void ufshpb_get_geo_info(struct ufs_hba *hba, u8
> > *geo_buf)
> > void ufshpb_get_dev_info(struct ufs_hba *hba, u8 *desc_buf)
> > {
> > struct ufshpb_dev_info *hpb_dev_info = >ufshpb_dev;
> > -int version;
> > +int version, ret;
> >
> >
> > static void __ufshpb_evict_region(struct ufshpb_lu *hpb,
> >struct ufshpb_region *rgn)
> > {
> > @@ -1209,6 +1579,16 @@ static void ufshpb_lu_parameter_init(struct
> > ufs_hba *hba,
> > u32 entries_per_rgn;
> > u64 rgn_mem_size, tmp;
sociated dirty
bitmap checked as dirty for preventing stale read.
HPB is shown to have a performance improvement of 58 - 67% for random read
workload. [1]
[1]:
https://www.usenix.org/conference/hotstorage17/program/presentation/jeong
Daejun Park (4):
scsi: ufs: Introduce HPB feature
scsi: ufs: L2P
> > +
> > +/*
> > + * In this driver, WRITE_BUFFER CMD support 36KB (len=9) ~ 512KB
> > (len=128) as
> > + * default. It is possible to change range of transfer_len through
> > sysfs.
> > + */
> > +static inline bool ufshpb_is_required_wb(struct ufshpb_lu *hpb, int
> > len)
> > +{
> > +
-by: kernel test robot
Signed-off-by: Daejun Park
---
Documentation/ABI/testing/sysfs-driver-ufs | 127 +
drivers/scsi/ufs/Kconfig | 9 +
drivers/scsi/ufs/Makefile | 1 +
drivers/scsi/ufs/ufs-sysfs.c | 18 +
drivers/scsi/ufs/ufs.h
d-by: Bean Huo
Signed-off-by: Daejun Park
---
drivers/scsi/ufs/ufs.h| 36 ++
drivers/scsi/ufs/ufshcd.c |4 +
drivers/scsi/ufs/ufshpb.c | 1091 -
drivers/scsi/ufs/ufshpb.h | 65 +++
4 files changed, 1181 insertions(+), 15 deletions(-)
diff --git
PPN.
The write buffer commands may not be issued immediately due to busy tags.
To use HPB read more aggressively, the driver can requeue the write buffer
command. The requeue threshold is implemented as timeout and can be
modified with requeue_timeout_ms entry in sysfs.
Signed-off-by: Daejun P
Huo
Signed-off-by: Daejun Park
---
drivers/scsi/ufs/ufshcd.c | 2 +
drivers/scsi/ufs/ufshpb.c | 253 +-
drivers/scsi/ufs/ufshpb.h | 2 +
3 files changed, 254 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> > > > @@ -2656,7 +2656,12 @@ static int ufshcd_queuecommand(struct
> > > Scsi_Host
> > > > > *host, struct scsi_cmnd *cmd)
> > > > >
> > > > > lrbp->req_abort_skip = false;
> > > > >
> > > > > - ufshpb_prep(hba, lrbp);
> > > > > + err = ufshpb_prep(hba, lrbp);
> > > > > +
> > + copied = ufshpb_fill_ppn_from_page(hpb, srgn->mctx, srgn_offset,
> > + pre_req->wb.len - offset,
> > + [offset]);
> > +
> > + if (copied < 0)
> > + goto mctx_error;
> > +
> > +
> > if (dev_info->wspecversion >= UFS_DEV_HPB_SUPPORT_VERSION &&
> > (b_ufs_feature_sup & UFS_DEV_HPB_SUPPORT)) {
> > - dev_info->hpb_enabled = true;
> > + bool hpb_en = false;
> > +
> > ufshpb_get_dev_info(hba, desc_buf);
> > +
> > +
> >
> > > +static int ufshpb_issue_umap_all_req(struct ufshpb_lu *hpb)
> > Maybe ufshpb_issue_umap_all_req is just a wrapper for
> > ufshpb_issue_umap_req?
> > e.g it calls ufshpb_issue_umap_req(hpb, int read_buferr_id = 0x3) ?
> > Then on host mode inactivation:
> > static int
> +/*
> > + * This function will parse recommended active subregion information in
> > sense
> > + * data field of response UPIU with SAM_STAT_GOOD state.
> > + */
> > +void ufshpb_rsp_upiu(struct ufs_hba *hba, struct ufshcd_lrb *lrbp)
> > +{
> > + struct ufshpb_lu *hpb;
> > + struct
> +/*
> > + * This function will parse recommended active subregion information in
> > sense
> > + * data field of response UPIU with SAM_STAT_GOOD state.
> > + */
> > +void ufshpb_rsp_upiu(struct ufs_hba *hba, struct ufshcd_lrb *lrbp)
> > +{
> > + struct ufshpb_lu *hpb;
> > + struct
> > + err = ufshpb_fill_ppn_from_page(hpb, srgn->mctx, srgn_offset, 1,
> > );
> > + spin_unlock_irqrestore(>rgn_state_lock, flags);
> > + if (unlikely(err < 0)) {
> > + /*
> > +* In this case, the region state is active,
> > +* but
> > @@ -7447,8 +7452,14 @@ static int ufs_get_device_desc(struct ufs_hba *hba)
> >
> > if (dev_info->wspecversion >= UFS_DEV_HPB_SUPPORT_VERSION &&
> > (b_ufs_feature_sup & UFS_DEV_HPB_SUPPORT)) {
> > - dev_info->hpb_enabled = true;
> > -
> > + if (!ufshpb_is_hpb_rsp_valid(hba, lrbp, rsp_field))
> > + return;
> > +
> > + hpb->stats.rb_noti_cnt++;
>
> > + switch (rsp_field->hpb_op) {
> > + case HPB_RSP_NONE:
> > + /* nothing to do */
> > + break;
> Maybe checks this
> > +}
> > +static DEVICE_ATTR_RW(requeue_timeout_ms);
> > +
> > +static struct attribute *hpb_dev_param_attrs[] = {
> > + _attr_requeue_timeout_ms.attr,
> > +};
>
> here, you lost a NULL member at the end of attribute struct.
>
OK, I will.
Thanks,
Daejun
> > > > +/*
> > > > + * This function will parse recommended active subregion information in
> > > > sense
> > > > + * data field of response UPIU with SAM_STAT_GOOD state.
> > > > + */
> > > > +void ufshpb_rsp_upiu(struct ufs_hba *hba, struct ufshcd_lrb *lrbp)
> > > > +{
> > > > + struct
mprovement of 58 - 67% for random read
workload. [1]
[1]:
https://www.usenix.org/conference/hotstorage17/program/presentation/jeong
Daejun Park (4):
scsi: ufs: Introduce HPB feature
scsi: ufs: L2P map management for HPB read
scsi: ufs: Prepare HPB read for cached sub-region
scsi: ufs: Add HPB
-by: kernel test robot
Signed-off-by: Daejun Park
---
Documentation/ABI/testing/sysfs-driver-ufs | 127 +
drivers/scsi/ufs/Kconfig | 9 +
drivers/scsi/ufs/Makefile | 1 +
drivers/scsi/ufs/ufs-sysfs.c | 18 +
drivers/scsi/ufs/ufs.h
Huo
Signed-off-by: Daejun Park
---
drivers/scsi/ufs/ufshcd.c | 2 +
drivers/scsi/ufs/ufshpb.c | 253 +-
drivers/scsi/ufs/ufshpb.h | 2 +
3 files changed, 254 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
PPN.
The write buffer commands may not be issued immediately due to busy tags.
To use HPB read more aggressively, the driver can requeue the write buffer
command. The requeue threshold is implemented as timeout and can be
modified with requeue_timeout_ms entry in sysfs.
Signed-off-by: Daejun P
d-by: Bean Huo
Signed-off-by: Daejun Park
---
drivers/scsi/ufs/ufs.h| 36 ++
drivers/scsi/ufs/ufshcd.c |4 +
drivers/scsi/ufs/ufshpb.c | 1091 -
drivers/scsi/ufs/ufshpb.h | 65 +++
4 files changed, 1181 insertions(+), 15 deletions(-)
diff --git
> > }
> > }
> > @@ -532,8 +870,8 @@ static int ufshpb_execute_map_req(struct
> > ufshpb_lu *hpb,
> > if (unlikely(last))
> > mem_size = hpb->last_srgn_entries * HPB_ENTRY_SIZE;
> >
> > - ufshpb_set_read_buf_cmd(rq->cmd, map_req->rgn_idx,
> >
> > > > > + err = ufshpb_fill_ppn_from_page(hpb, srgn->mctx, srgn_offset,
> > > > > 1,
> > > );
> > > > > + spin_unlock_irqrestore(>rgn_state_lock, flags);
> > > > > + if (unlikely(err < 0)) {
> > > > > + /*
> > > > > +* In this case, the region
> > @@ -2656,7 +2656,12 @@ static int ufshcd_queuecommand(struct Scsi_Host
> > *host, struct scsi_cmnd *cmd)
> >
> > lrbp->req_abort_skip = false;
> >
> > - ufshpb_prep(hba, lrbp);
> > + err = ufshpb_prep(hba, lrbp);
> > + if (err == -EAGAIN) {
> > +
-by: kernel test robot
Signed-off-by: Daejun Park
---
Documentation/ABI/testing/sysfs-driver-ufs | 127 +
drivers/scsi/ufs/Kconfig | 9 +
drivers/scsi/ufs/Makefile | 1 +
drivers/scsi/ufs/ufs-sysfs.c | 18 +
drivers/scsi/ufs/ufs.h
d-by: Bean Huo
Signed-off-by: Daejun Park
---
drivers/scsi/ufs/ufs.h| 36 ++
drivers/scsi/ufs/ufshcd.c |4 +
drivers/scsi/ufs/ufshpb.c | 1091 -
drivers/scsi/ufs/ufshpb.h | 65 +++
4 files changed, 1181 insertions(+), 15 deletions(-)
diff --git
shpb_map
request. For the in-active region, the HPB discards the L2P map.
When a write I/O occurs in an active sub-region area, associated dirty
bitmap checked as dirty for preventing stale read.
HPB is shown to have a performance improvement of 58 - 67% for random read
workload. [1]
[1]:
https://www
> > +static int ufshpb_fill_ppn_from_page(struct ufshpb_lu *hpb,
> > +struct ufshpb_map_ctx *mctx, int pos,
> > +int len, u64 *ppn_buf)
> > +{
> > + struct page *page;
> > + int index, offset;
> > + int
Huo
Signed-off-by: Daejun Park
---
drivers/scsi/ufs/ufshcd.c | 2 +
drivers/scsi/ufs/ufshpb.c | 253 +-
drivers/scsi/ufs/ufshpb.h | 2 +
3 files changed, 254 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
PPN.
The write buffer commands may not be issued immediately due to busy tags.
To use HPB read more aggressively, the driver can requeue the write buffer
command. The requeue threshold is implemented as timeout and can be
modified with requeue_timeout_ms entry in sysfs.
Signed-off-by: Daejun P
Hi Asutosh Das,
>During runtime-suspend of ufs host, the scsi devices are
>already suspended and so are the queues associated with them.
>But the ufs host sends SSU (START_STOP_UNIT) to wlun
>during its runtime-suspend.
>During the process blk_queue_enter checks if the queue is not in
>suspended
Hi Asutosh Das,
>+static inline bool is_rpmb_wlun(struct scsi_device *sdev)
>+{
>+return (sdev->lun ==
>ufshcd_upiu_wlun_to_scsi_wlun(UFS_UPIU_RPMB_WLUN));
>+}
>+
>+static inline bool is_device_wlun(struct scsi_device *sdev)
>+{
>+return (sdev->lun ==
>+
the device is
resumed, fWriteBoosterBufferFlushDuringHibernate is cleared to stop flush
during hibern8.
Co-developed-by: Keoseong Park
Signed-off-by: Keoseong Park
Signed-off-by: Daejun Park
---
Documentation/ABI/testing/sysfs-driver-ufs | 9
drivers/scsi/ufs/ufs-sysfs.c | 50
-off-by: Daejun Park
---
Documentation/ABI/testing/sysfs-driver-ufs | 9 +
drivers/scsi/ufs/ufs-sysfs.c | 47 ++
drivers/scsi/ufs/ufshcd.c | 14 +--
drivers/scsi/ufs/ufshcd.h | 2 +
4 files changed, 68 insertions(+), 4
the device is
resumed, fWriteBoosterBufferFlushDuringHibernate is cleared to stop flush
during hibern8.
Changelog
Fix warning reported by kernel test robot.
Co-developed-by: Keoseong Park
Signed-off-by: Keoseong Park
Signed-off-by: Daejun Park
---
Documentation/ABI/testing/sysfs-driver-ufs | 9
-by: kernel test robot
Signed-off-by: Daejun Park
---
Documentation/ABI/testing/sysfs-driver-ufs | 127 +
drivers/scsi/ufs/Kconfig | 9 +
drivers/scsi/ufs/Makefile | 1 +
drivers/scsi/ufs/ufs-sysfs.c | 18 +
drivers/scsi/ufs/ufs.h
d-by: Bean Huo
Signed-off-by: Daejun Park
---
drivers/scsi/ufs/ufs.h| 36 ++
drivers/scsi/ufs/ufshcd.c |4 +
drivers/scsi/ufs/ufshpb.c | 1048 -
drivers/scsi/ufs/ufshpb.h | 65 +++
4 files changed, 1138 insertions(+), 15 deletions(-)
diff --git
Huo
Signed-off-by: Daejun Park
---
drivers/scsi/ufs/ufshcd.c | 2 +
drivers/scsi/ufs/ufshpb.c | 245 ++
drivers/scsi/ufs/ufshpb.h | 2 +
3 files changed, 249 insertions(+)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 5852ff44c3cc
PPN.
The write buffer commands may not be issued immediately due to busy tags.
To use HPB read more aggressively, the driver can requeue the write buffer
command. The requeue threshold is implemented as timeout and can be
modified with requeue_timeout_ms entry in sysfs.
Signed-off-by: Daejun P
ad
workload. [1]
[1]:
https://www.usenix.org/conference/hotstorage17/program/presentation/jeong
Daejun Park (4):
scsi: ufs: Introduce HPB feature
scsi: ufs: L2P map management for HPB read
scsi: ufs: Prepare HPB read for cached sub-region
scsi: ufs: Add HPB 2.0 support
Documenta
g stale read.
HPB is shown to have a performance improvement of 58 - 67% for random read
workload. [1]
[1]:
https://www.usenix.org/conference/hotstorage17/program/presentation/jeong
Daejun Park (4):
scsi: ufs: Introduce HPB feature
scsi: ufs: L2P map management for HPB read
scsi: ufs:
d-by: Bean Huo
Signed-off-by: Daejun Park
---
drivers/scsi/ufs/ufs.h| 36 ++
drivers/scsi/ufs/ufshcd.c |4 +
drivers/scsi/ufs/ufshpb.c | 1048 -
drivers/scsi/ufs/ufshpb.h | 65 +++
4 files changed, 1138 insertions(+), 15 deletions(-)
diff --git
-by: kernel test robot
Signed-off-by: Daejun Park
---
Documentation/ABI/testing/sysfs-driver-ufs | 127 +
drivers/scsi/ufs/Kconfig | 9 +
drivers/scsi/ufs/Makefile | 1 +
drivers/scsi/ufs/ufs-sysfs.c | 18 +
drivers/scsi/ufs/ufs.h
PPN.
The write buffer commands may not be issued immediately due to busy tags.
To use HPB read more aggressively, the driver can requeue the write buffer
command. The requeue threshold is implemented as timeout and can be
modified with requeue_timeout_ms entry in sysfs.
Signed-off-by: Daejun P
Huo
Signed-off-by: Daejun Park
---
drivers/scsi/ufs/ufshcd.c | 2 +
drivers/scsi/ufs/ufshpb.c | 245 ++
drivers/scsi/ufs/ufshpb.h | 2 +
3 files changed, 249 insertions(+)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 5852ff44c3cc
Sorry for previous mail. Please just ignore that.
> > + /* for pre_req */
> > + hpb->pre_req_min_tr_len = HPB_MULTI_CHUNK_LOW;
> This actually needs to be bMAX_DATA_SIZE_FOR_HPB_SINGLE_CMD.
OK,
> Also wasn't able to find any reference to fHPBen?
OK, I will
Thanks,
Daejun
> +void ufshpb_rsp_upiu(struct ufs_hba *hba, struct ufshcd_lrb *lrbp)
> > +{
> > + struct ufshpb_lu *hpb = ufshpb_get_hpb_data(lrbp->cmd->device);
> > + struct utp_hpb_rsp *rsp_field;
> > + int data_seg_len;
> > +
> > + if (!hpb)
> > + return;
> > +
> > +
> +static bool ufshpb_is_hpb_rsp_valid(struct ufs_hba *hba,
> > +struct ufshcd_lrb *lrbp,
> > +struct utp_hpb_rsp *rsp_field)
> > +{
> > + if (be16_to_cpu(rsp_field->sense_data_len) != DEV_SENSE_SEG_LEN ||
> > +
> > kmem_cache_destroy(hpb->map_req_cache);
> > @@ -1670,7 +2109,7 @@ void ufshpb_init_hpb_lu(struct ufs_hba *hba, struct
> > scsi_device *sdev)
> > if (ret)
> > goto out;
> >
> > - hpb = ufshpb_alloc_hpb_lu(hba, lun, >ufshpb_dev,
> > + hpb =
> +static u64 ufshpb_get_ppn(struct ufshpb_lu *hpb,
> > + struct ufshpb_map_ctx *mctx, int pos, int *error)
> > +{
> > + u64 *ppn_table;
> > + struct page *page;
> > + int index, offset;
> > +
> > + index = pos / (PAGE_SIZE / HPB_ENTRY_SIZE);
> > +
201 - 300 of 305 matches
Mail list logo