-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
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
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
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 s
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 ==
>+ufshcd_upiu
Hi Can Guo,
>
>Hi Daejun,
>
>On 2021-04-06 12:11, Daejun Park wrote:
>> Hi Can Guo,
>>
>>> +static ssize_t monitor_enable_store(struct device *dev,
>>> +struct device_attribute *attr,
>>> +
Hi Can Guo,
> +static ssize_t monitor_enable_store(struct device *dev,
> +struct device_attribute *attr,
> +const char *buf, size_t count)
> +{
> +struct ufs_hba *hba = dev_get_drvdata(dev);
> +unsigned long va
> drivers/scsi/ufs/ufshpb.h | 44 ++
> 4 files changed, 663 insertions(+), 35 deletions(-)
>
The patches in this series look good to me.
Reviewed-by: Daejun Park
Hi, Can Guo
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
...
>
> req->end_io_data = &wait;
> - free_slot = req->tag;
> WARN_ON_ONCE(free_slot < 0 || free_slot >= hba->nutmrs);
I think this line should be removed.
Thanks,
Daejun
-by: Bean Huo
Signed-off-by: Daejun Park
---
Documentation/ABI/testing/sysfs-driver-ufs | 47 +-
drivers/scsi/ufs/ufs-sysfs.c | 4 +
drivers/scsi/ufs/ufs.h | 3 +-
drivers/scsi/ufs/ufshcd.c | 25 +-
drivers/scsi/ufs/ufshcd.h |
Altman
Tested-by: Bean 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
by: Avri Altman
Tested-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 deletion
: Bean Huo
Reported-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
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 map management for HPB
> On 2021-03-25 08:47, Daejun Park wrote:
> >> On 2021-03-22 14:55, 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 (<
> On 2021-03-22 14:55, 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 (<= 32KB) is supported as single HPB read.
> > In the case of Read (36KB ~ 512KB)
>On 2021-03-23 14:19, Daejun Park wrote:
>>> On 2021-03-23 13:37, Daejun Park wrote:
>>>>> On 2021-03-23 12:22, Can Guo wrote:
>>>>>> On 2021-03-22 17:11, Bean Huo wrote:
>>>>>>> On Mon, 2021-03-22 at 15:54 +0
>On 2021-03-23 13:37, Daejun Park wrote:
>>> On 2021-03-23 12:22, Can Guo wrote:
>>>> On 2021-03-22 17:11, Bean Huo wrote:
>>>>> On Mon, 2021-03-22 at 15:54 +0900, Daejun Park wrote:
>>>>>> + switch (rsp_field->hpb
>On 2021-03-23 12:22, Can Guo wrote:
>> On 2021-03-22 17:11, Bean Huo wrote:
>>> On Mon, 2021-03-22 at 15:54 +0900, Daejun Park wrote:
>>>> + switch (rsp_field->hpb_op) {
>>>>
>>>> + case HPB_RSP_REQ_REGION_UPDATE:
>&g
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)
>>
>> +
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 | 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
y: 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
: 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
PB 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: Prepare HPB read for cached s
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 | 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
y: 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
: 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
ub-region, the HPB caches 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% f
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 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 a
>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.
>>&
>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
>> >> ---
>> >> 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
>> --- a/dr
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
>> >> --- a/drivers/scsi/ufs/u
>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 (<
timeout and can be
>> modified with requeue_timeout_ms entry in sysfs.
>>
>> Signed-off-by: Daejun Park
>> ---
>> +static struct attribute *hpb_dev_param_attrs[] = {
>> +&dev_attr_requeue_timeout_ms.attr,
>> +NULL,
>> +}
;>>> >
>>>>> > To gurantee a minimum memory pool size of 4MB:
>>>>> > ufshpb_host_map_kbytes=4096
>>>>> >
>>>>> > The map_work manages active/inactive by 2 "to-do" lists.
>>>>> > Eac
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 | 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
y: 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
: 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
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.usenix.org/conference/hotstorage17/program/presentation/jeong
Daejun Pa
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 | 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
y: 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
: 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
hecked 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 map management
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 | 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
y: 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
: 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
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: Prepare HPB read for cached s
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
k manages active/inactive by 2 "to-do" lists.
> > Each hpb lun maintains 2 "to-do" lists:
> > hpb->lh_inact_rgn - regions to be inactivated, and
> > hpb->lh_act_srgn - subregions to be activated
> > Those lists are maintained on IO completion.
> &g
> Each hpb lun maintains 2 "to-do" lists:
> > hpb->lh_inact_rgn - regions to be inactivated, and
> > hpb->lh_act_srgn - subregions to be activated
> > Those lists are maintained on IO completion.
> >
> > Reviewed-by: Bart
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, st
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:
>
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(&pre_req->list_req, &hpb->lh_pre_req_free);
> >
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
y: 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
: 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
ive 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.usenix.org/conference/hotstorage17/program/presentation/jeong
Daejun Park (4):
scsi: ufs: Introduce HPB
> > @@ -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 = &hba->ufshpb_dev;
> > -int version;
> > +int version, ret;
> >
> > +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 ufshpb_is_write_or_discard_cmd
> >
> > 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;
> > +
> > +/*
> > + * 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)
> > +{
> > + retur
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 ufshpb_regi
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; r
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,
> 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 (
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
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
y: 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
: 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
vement 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
sc
> > +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),
> > +
> >
> > +void ufshpb_init(struct ufs_hba *hba)
> > +{
> > +struct ufshpb_dev_info *hpb_dev_info = &hba->ufshpb_dev;
> > +int try;
> > +int ret;
> > +
> > +if (!ufshpb_is_allowed(hba))
> > +return;
> > +
>
> Here it is better to check "dev_info->hpb
> > 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 ufshpb_issue_umap_s
> > + copied = ufshpb_fill_ppn_from_page(hpb, srgn->mctx, srgn_offset,
> > + pre_req->wb.len - offset,
> > + &addr[offset]);
> > +
> > + if (copied < 0)
> > + goto mctx_error;
> > +
> > +
> > > > @@ -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);
> > > > > +
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
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
y: 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
: 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
n 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: Prepare HPB read for cached sub-re
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
y: 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
: 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
e HPB caches 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
worklo
> > @@ -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) {
> > + lrbp->
> > +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 copied
> > > > > + err = ufshpb_fill_ppn_from_page(hpb, srgn->mctx, srgn_offset,
> > > > > 1,
> > > &ppn);
> > > > > + spin_unlock_irqrestore(&hpb->rgn_state_lock, flags);
> > > > > + if (unlikely(err < 0)) {
> > > > > + /*
> > > > > +* In this case, the re
1 - 100 of 305 matches
Mail list logo