ill you fix it
in
next version?
warning: variable 'flags' is uninitialized when used here
[-Wuninitialized]
Yeah - I will pass it to __ufshpb_evict_region and drop the
lockdep_assert call.
Please paste the sample code/change here so that I can move forward
quickly.
I don't w
On 2021-04-06 13:58, Daejun Park wrote:
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,
+const char
Checked on my setup, this lead to compilation error. Will you fix it in
next version?
warning: variable 'flags' is uninitialized when used here
[-Wuninitialized]
Thanks,
Can Guo.
Thanks,
Avri
Thanks,
Can Guo.
> + ret = ufshpb_issue_umap_single_req(hpb, rgn);
&
On 2021-04-06 13:37, Can Guo wrote:
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,
+const char *buf, size_t count
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,
+const char *buf, size_t count)
+{
+struct ufs_hba *hba
gn_state_lock, flags);
Never seen a usage like this... Here flags is used without being
intialized.
The flag is needed when spin_unlock_irqrestore ->
local_irq_restore(flags) to
restore the DAIF register (in terms of ARM).
Thanks,
Can Guo.
+ ret = ufshpb_issue_u
In __ufshcd_issue_tm_cmd(), it is not right to use hba->nutrs + req->tag as
the Task Tag in one TMR UPIU. Directly use req->tag as the Task Tag.
Fixes: e293313262d3 ("scsi: ufs: Fix broken task management command
implementation")
Reviewed-by: Bart Van Assche
Sig
calling blk_mq_start_request() in __ufshcd_issue_tm_cmd().
Fixes: 69a6c269c097 ("scsi: ufs: Use blk_{get,put}_request() to allocate and
free TMFs")
Signed-off-by: Can Guo
---
drivers/scsi/ufs/ufshcd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/ufs/ufshcd.c b/dr
On 2021-04-01 14:44, Daejun Park wrote:
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 lin
Add a new sysfs group which has nodes to monitor data/request transfer
performance. This sysfs group has nodes showing total sectors/requests
transferred, total busy time spent and max/min/avg/sum latencies.
Signed-off-by: Can Guo
diff --git a/Documentation/ABI/testing/sysfs-driver-ufs
b
during runtime.
Signed-off-by: Can Guo
diff --git a/drivers/scsi/ufs/ufs-sysfs.c b/drivers/scsi/ufs/ufs-sysfs.c
index acc54f5..348df0e 100644
--- a/drivers/scsi/ufs/ufs-sysfs.c
+++ b/drivers/scsi/ufs/ufs-sysfs.c
@@ -278,6 +278,242 @@ static const struct attribute_group
ufs_sysfs_default_group
Add a new sysfs group which has nodes to monitor data/request transfer
performance. This sysfs group has nodes showing total sectors/requests
transferred, total busy time spent and max/min/avg/sum latencies.
Signed-off-by: Can Guo
diff --git a/Documentation/ABI/testing/sysfs-driver-ufs
b
during runtime.
Signed-off-by: Can Guo
diff --git a/drivers/scsi/ufs/ufs-sysfs.c b/drivers/scsi/ufs/ufs-sysfs.c
index acc54f5..1f93f3e 100644
--- a/drivers/scsi/ufs/ufs-sysfs.c
+++ b/drivers/scsi/ufs/ufs-sysfs.c
@@ -278,6 +278,242 @@ static const struct attribute_group
ufs_sysfs_default_group
ends up with completion timeout. Fix
it by
calling blk_mq_start_request() in __ufshcd_issue_tm_cmd().
Fixes: 69a6c269c097 ("scsi: ufs: Use blk_{get,put}_request() to
allocate and
free TMFs")
Signed-off-by: Can Guo
---
drivers/scsi/ufs/ufshcd.c | 1 +
1 file changed, 1 insertio
In __ufshcd_issue_tm_cmd(), it is not right to use hba->nutrs + req->tag as
the Task Tag in one TMR UPIU. Directly use req->tag as the Task Tag.
Fixes: e293313262d3 ("scsi: ufs: Fix broken task management command
implementation")
Reviewed-by: Bart Van Assche
Sig
calling blk_mq_start_request() in __ufshcd_issue_tm_cmd().
Fixes: 69a6c269c097 ("scsi: ufs: Use blk_{get,put}_request() to allocate and
free TMFs")
Signed-off-by: Can Guo
---
drivers/scsi/ufs/ufshcd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/ufs/ufshcd.c b/dr
in sysfs.
Reviewed-by: Can Guo
Reviewed-by: Bean Huo
Signed-off-by: Daejun Park
---
Please allow me a few more days in April to have this whole series
tested one more time.
Thanks,
Can Guo.
during runtime.
Signed-off-by: Can Guo
---
drivers/scsi/ufs/ufs-sysfs.c | 237 +++
drivers/scsi/ufs/ufshcd.c| 62 +++
drivers/scsi/ufs/ufshcd.h| 21
3 files changed, 320 insertions(+)
diff --git a/drivers/scsi/ufs/ufs-sysfs.c b
Add a new sysfs group which has nodes to monitor data/request transfer
performance. This sysfs group has nodes showing total sectors/requests
transferred, total busy time spent and max/min/avg/sum latencies.
Signed-off-by: Can Guo
---
Documentation/ABI/testing/sysfs-driver-ufs | 126
dx, srgn_idx, srgn_offset,
> transfer_len);
> spin_unlock_irqrestore(&hpb->rgn_state_lock, flags);
> -return;
> +return 0;
> }
>
> -if (!ufshpb_is_support_chunk(transfe
A rgn which host chooses to
activate,
is in INACTIVE state now, if its rgn->reads < 256, then don't activate
it.
Could you please elaborate?
Thanks,
Can Guo.
victim_rgn = ufshpb_victim_lru_info(hpb);
if (!victim_rgn) {
dev_warn(&hpb->sdev_ufs_lu->sdev_dev,
On 2021-03-24 17:33, Bean Huo wrote:
On Wed, 2021-03-24 at 17:24 +0800, Can Guo wrote:
On 2021-03-24 16:37, Bean Huo wrote:
> On Wed, 2021-03-24 at 09:45 +0800, Can Guo wrote:
> > On 2021-03-23 20:48, Avri Altman wrote:
> >
> > > > On 2021-03-23 14:37, Daejun Park wr
n->rgn_lock);
+ if (activate) {
+ spin_lock_irqsave(&hpb->rsp_list_lock, flags);
+ ufshpb_update_active_info(hpb, rgn_idx, srgn_idx);
If a transfer_len (possible with HPB2.0) sits accross two
regions/sub-regions,
here it only
On 2021-03-24 16:37, Bean Huo wrote:
On Wed, 2021-03-24 at 09:45 +0800, Can Guo wrote:
On 2021-03-23 20:48, Avri Altman wrote:
> > On 2021-03-23 14:37, Daejun Park wrote:
> > > > On 2021-03-23 14:19, Daejun Park wrote:
> > > > > > On 2021-03-23 13:37, Daejun
nsfer_len);
+ ufshpb_set_hpb_read_to_upiu(hpb, lrbp, lpn, ppn, transfer_len,
read_id);
hpb->stats.hit_cnt++;
+ return 0;
}
-static struct ufshpb_req *ufshpb_get_map_req(struct ufshpb_lu *hpb,
-struct ufshpb_subregion *srgn
tions from device,
because the bkops would make the ppn invalid, is that right?
Right, but ONLY recommandations to ACTIVE regions are of host's interest
in host control mode. For those inactive regions, host makes its own
decisions.
Can Guo.
dev_dbg(&hpb-&
On 2021-03-23 20:48, Avri Altman wrote:
On 2021-03-23 14:37, Daejun Park wrote:
>> 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
On 2021-03-23 14:37, Daejun Park wrote:
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 +0900, Daejun Park wrote:
+ switch (rsp_field->hpb
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 +0900, Daejun Park wrote:
+ switch (rsp_field->hpb_op) {
+ case HPB_RSP_REQ_REGION_UPD
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_op) {
+ case HPB_RSP_REQ_REGION_UPDATE:
+ if (data_seg_
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:
+ if (data_seg_len != DEV_DATA_SEG_LEN)
+ dev_w
e you - check
https://git.kernel.org/mkp/scsi/c/b4388e3db56a
Can Guo.
SP_DEV_RESET from the host side? Do you think we shoud
reset host side HPB entry as well or what else?
Bean
Same question here - I am still collecting feedbacks from flash vendors
about
what is recommanded host behavior on reception of HPB Op code 0x2, since
it
is not cleared defined in HPB2.0 specs.
Can Guo.
On 2021-03-17 11:31, Daejun Park wrote:
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
Reviewed-by: Can Guo
---
drivers/scsi/ufs/ufs-sysfs.c | 2
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.
The HPB 2.0 supports read of varying sizes from 4KB to 512KB.
In the case of Read (<= 32KB)
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.
The HPB 2.0 supports read of varying sizes from 4KB to 512KB.
In the case of Read (<= 32KB)
> The device send device reset so it is aware that all the L2P cache is
> invalid.
> Any HPB_READ is treated like normal READ10.
>
> Only once HPB-READ-BUFFER is completed,
> the device will relate back to the physical address.
What about HPB-WRITE-BUFFER (buffer id = 0x2) cmds?
o do in that case.
Then it means that all the clean (without DIRTY flag set) HPB entries
(ppns)
in active rgns in host memory side may not be valid to the device
anymore.
Please correct me if I am wrong.
> We thought that in host mode, it make sense to update all the active
> regions.
But
ve regions as UPDATE.
Although one of subsequent read cmds shall put the sub-region back to
activate_list,
ufshpb_test_ppn_dirty() can still return false, thus these read cmds
still think the
ppns are valid and they shall move forward to send HPB Write Buffer
(buffer id = 0x2,
in case of HP
work?
I don't know, I never even consider of doing this.
The active region list may contain up to few thousands of regions -
It is not rare to see configurations that covers the entire device.
Yes, true, it can be a huge list. But what does the ops
"HPB_RSP_DEV_RESET"
really mean? The specs
run_inactive_region_list(struct ufshpb_lu *hpb)
spin_unlock_irqrestore(&hpb->rsp_list_lock, flags);
}
+static void ufshpb_reset_work_handler(struct work_struct *work)
Just curious, directly doing below things inside ufshpb_rsp_upiu() does
not
seem a problem to me, does this
eq_cache,
GFP_KERNEL)
has the GFP_KERNEL flag, scheduling while atomic???
I think your comment applies to ufshpb_issue_umap_all_req as well,
Which is called from slave_configure/scsi_add_lun.
Since the host-mode series is utilizing the framework laid by the
device-mode,
Maybe you can add this com
p_req_cache,
GFP_KERNEL)
has the GFP_KERNEL flag, scheduling while atomic???
I think your comment applies to ufshpb_issue_umap_all_req as well,
Which is called from slave_configure/scsi_add_lun.
Since the host-mode series is utilizing the framework laid by the
device-mode,
Maybe you can add
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 of varying sizes from 4KB to 512KB.
In the case of Read (<= 32KB) is supported as single HPB read.
In the case of R
leting it.
The timeout handler, being a delayed work, is meant to run every
polling period.
Originally, I had it protected from 2 handlers running concurrently,
But I removed it following Daejun's comment, which I accepted,
Since it is always scheduled using the sa
p_req_cache,
GFP_KERNEL)
has the GFP_KERNEL flag, scheduling while atomic???
I think your comment applies to ufshpb_issue_umap_all_req as well,
Which is called from slave_configure/scsi_add_lun.
ufshpb_issue_umap_all_req() is not called from atomic contexts,
so ufshpb_issue_umap_all_req() is fi
list, it
shall become
a dead loop here.
And, which lock is protecting rgn->list_expired_rgn? If two
read_to_handler works
are running in parallel, one can be inserting it to its expired_list
while another
can be deleting it.
Can Guo.
+ list_del_init(&r
ll definitely
cause you error...
Can Guo.
Thanks,
Avri
Thanks,
Can Guo.
> + rgn->reads = 0;
> + spin_unlock_irqrestore(&rgn->rgn_lock, flags);
> + }
> +
> return 0;
> }
>
> if (!ufshp
rgn->reads)
+ continue;
+
+ /* if region is active but has no reads - inactivate it */
+ spin_lock(&hpb->rsp_list_lock);
+ ufshpb_update_inactive_info(hpb, rgn->rgn_idx);
Miss a hpb->stats.rb_inactive_cnt++ here?
Tha
On 2021-03-02 21:25, Avri Altman wrote:
in host control mode the host is the originator of map requests. To not
in -> In
Thanks,
Can Guo.
flood the device with map requests, use a simple throttling mechanism
that limits the number of inflight map requests.
Signed-off-by: Avri Alt
Maybe merge the new comments with the original comments above?
Thanks,
Can Guo.
+ if (hpb->is_hcm && rgn->reads < EVICTION_THRESHOLD) {
+ ret = -EACCES;
+ goto out;
+ }
+
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 (<= 32KB) is supported as single HPB read.
In the case of Read (36KB ~ 512KB) is supported by a
On 2021-03-15 12:02, Can Guo wrote:
On 2021-03-02 21:24, Avri Altman wrote:
I host mode, the host is expected to send HPB-WRITE-BUFFER with
buffer-id = 0x1 when it inactivates a region.
Use the map-requests pool as there is no point in assigning a
designated cache for umap-requests.
Signed
, it just
only for first pre_req.
I meant removing the bio_alloc() in ufshpb_issue_pre_req() and bio_put()
in ufshpb_pre_req_compl_fn(). bios, in pre_req's case, just hold a page.
So, prepare 16 (if queue depth is 32) bios here, just use them along
with
wb.m_page and call bio_reset() in ufshpb_pre_req
On 2021-03-15 09:34, Can Guo wrote:
On 2021-03-02 21:24, Avri Altman wrote:
The spec does not define what is the host's recommended response when
the device send hpb dev reset response (oper 0x2).
We will update all active hpb regions: mark them and do that on the
next
read.
Signed-o
ags;
+ int _read_id;
+ int ret = 0;
+
+ req = blk_get_request(cmd->device->request_queue,
To keep symmetry with ufshpb_get_req(), can we use
hpb->sdev_ufs_lu->request_queue?
Thanks,
Can Guo.
+ REQ_OP_SCSI_OUT | REQ_SYNC, BL
_req->list_req);
+ pre_req->req = NULL;
+ pre_req->bio = NULL;
Why don't prepare bio as same as wb.m_page? Won't that save more time
for ufshpb_issue_pre_req()?
Thanks,
Can Guo.
+
+ pre_req->wb.m_page = al
nd_io_fn *done)
{
WARN_ON(irqs_disabled());
...
Thanks.
Can Guo.
+ return;
+
lru_info = &hpb->lru_info;
dev_dbg(&hpb->sdev_ufs_lu->sdev_dev, "evict region %d\n",
rgn->rgn_idx);
@@ -1855,6 +1866,7 @@ ufshpb_sysfs_attr_show_func(rb_noti_cnt)
so no need of irqsave and
irqrestore everywhere, which can impact performance. Please correct
me if I am wrong.
Meanwhile, have you ever initialized the rgn_lock before use it???
Thanks,
Can Guo.
+ rgn->reads = 0;
+ spin_unlock_irqrestore(&a
- regions to be inactivated, and
> hpb->lh_act_srgn - subregions to be activated
> Those lists are maintained on IO completion.
>
> Reviewed-by: Bart Van Assche
> Reviewed-by: Can Guo
> Acked-by: Avri Altman
> Tested-by: Bean H
ead_to_work.work);
usually we use this to get data of a delayed work.
+ struct victim_select_info *lru_info;
struct victim_select_info *lru_info = &hpb->lru_info;
This can save some lines.
Thanks,
Can Guo.
+ struct ufshpb_region *rgn;
+ unsigned long flags;
+
;
+ struct victim_select_info *lru_info;
struct victim_select_info *lru_info = &hpb->lru_info;
This can save some lines.
Thanks,
Can Guo.
+ struct ufshpb_region *rgn;
+ unsigned long flags;
+
+ spin_lock_irqsave(&hpb->rgn_state_lock, flag
- regions to be inactivated, and
> hpb->lh_act_srgn - subregions to be activated
> Those lists are maintained on IO completion.
>
> Reviewed-by: Bart Van Assche
> Reviewed-by: Can Guo
> Acked-by: Avri Altman
> Tested-by: Bean H
On 2021-03-12 06:19, Asutosh Das wrote:
Resumes the actual scsi device the unit descriptor of which
is being accessed instead of the hba alone.
Signed-off-by: Asutosh Das
You lost my reviewed-by:
reviewed-by: Can Guo
---
drivers/scsi/ufs/ufs-sysfs.c | 30
SCSI command.
In the HPB version 1.0, the maximum read I/O size that can be converted
to
HPB read is 4KB.
The dirty map of the active sub-region prevents an incorrect HPB read
that
has stale physical page number which is updated by previous write I/O.
Reviewed-by: Can Guo
Reviewed-by: Bart Van
The map_work 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.
Reviewed-by: Bart Van Assche
R
The map_work 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.
Reviewed-by: Bart Van Assche
R
urn ufshpb_issue_umap_req(hpb, NULL);
@@ -1115,6 +1122,10 @@ static void __ufshpb_evict_region(struct
ufshpb_lu *hpb,
struct ufshpb_subregion *srgn;
int srgn_idx;
+
No need of this blank line.
Regards,
Can Guo.
+ if (hpb->is_hcm && ufshpb_issue_umap_single_req(hpb, rgn))
+
#include "../sd.h"
>
> +#define ACTIVATION_THRESHOLD 4 /* 4 IOs */
Can this param be added as a sysfs entry?
Yes.
Daejun asked me that as well, so the last patch makes all logic
parameter configurable.
Thanks,
Avri
Ok, thanks. I haven't reach the last one, absorbing them one by one.
Can Guo.
Thanks,
Can Guo
4 /* 4 IOs */
+#define EVICTION_THRESHOLD (ACTIVATION_THRESHOLD << 6) /* 256 IOs */
Same here, can this be added as a sysfs entry?
Thanks,
Can Guo.
/* memory management */
static struct kmem_cache *ufshpb_mctx_cache;
@@ -1050,6 +1051,13 @@ static struct ufshpb_region
*ufshpb_victim_lru_info(
rivers/scsi/ufs/ufshpb.c
index 044fec9854a0..a8f8d13af21a 100644
--- a/drivers/scsi/ufs/ufshpb.c
+++ b/drivers/scsi/ufs/ufshpb.c
@@ -16,6 +16,8 @@
#include "ufshpb.h"
#include "../sd.h"
+#define ACTIVATION_THRESHOLD 4 /* 4 IOs */
Can this param be added as a sysfs entry?
Thanks
Hi Daejun,
On 2021-03-09 09:38, Can Guo wrote:
Hi Daejun,
If you are about to push Ver.27, please hold on. I run into OCP issues
on VCCQ every time after apply this patch. The issue can be work around
by disabling runtime PM. Before you or we figure out where the BUG is,
it is pointless to
Hi Daejun,
If you are about to push Ver.27, please hold on. I run into OCP issues
on VCCQ every time after apply this patch. The issue can be work around
by disabling runtime PM. Before you or we figure out where the BUG is,
it is pointless to push next version.
Regards,
Can Guo.
On 2021-03-03
On 2021-03-03 22:50, Bean Huo wrote:
On Wed, 2021-03-03 at 15:29 +0900, Daejun Park wrote:
+
+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_a
= 0x11,
+ QUERY_FLAG_IDN_HPB_EN = 0x12,
Also add this flag to sysfs?
Thanks,
Can Guo.
};
/* Attribute idn for Query requests */
enum attr_idn {
QUERY_ATTR_IDN_BOOT_LU_EN = 0x00,
- QUERY_ATTR_IDN_RESERVED
ut the checks in
ufshpb_is_support_chunk()?
Thanks,
Can Guo.
rnel.org/patchwork/patch/1383817/
Thanks,
Can Guo.
by: Adrian Hunter
I think that CanG recent series addressed that issue as well, can you
take a look?
https://lore.kernel.org/lkml/1614145010-36079-2-git-send-email-c...@codeaurora.org/
Yes, there it is mixed in with other changes. However it is probably
better
as a separate patch. Can Guo, w
On 2021-03-03 18:03, Can Guo wrote:
Hi Avri,
On 2021-03-03 15:22, Avri Altman wrote:
In error handling prepare stage, after SCSI requests are blocked, do
a
down/up_write(clk_scaling_lock) to clean up the queuecommand() path.
Meanwhile, stop eeh_work in case it disturbs error recovery
entrance of ufshcd_probe_hba(), since it may
be
called multiple times during error recovery.
Signed-off-by: Can Guo
I noticed that you tagged Adrian's patch -
https://lore.kernel.org/lkml/20210301191940.15247-1-adrian.hun...@intel.com/
So this patch needs to be adjusted accordingly?
Thank
On 2021-03-03 06:52, Asutosh Das wrote:
Resumes the actual scsi device the unit descriptor of which
is being accessed instead of the hba alone.
Signed-off-by: Asutosh Das
Reviewed-by: Can Guo
---
drivers/scsi/ufs/ufs-sysfs.c | 30 +-
1 file changed, 17
On 2021-02-26 15:35, 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) is supported by as a combination of
write buffer command and HP
On 2021-02-28 22:23, Avri Altman wrote:
From: Nitin Rawat
Disable interrupt in reset path to flush pending IRQ handler in order
to
avoid possible NoC issues.
Signed-off-by: Nitin Rawat
Signed-off-by: Can Guo
---
drivers/scsi/ufs/ufs-qcom.c | 10 ++
1 file changed, 10 insertions
re_req_max_tr_len;
In the case of HPB1.0, this is wrong - you are allowing transfer_len > 1
for HPB1.0 devices.
Can Guo.
+}
+
+/*
+ * 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.
+
From: Nitin Rawat
Disable interrupt in reset path to flush pending IRQ handler in order to
avoid possible NoC issues.
Signed-off-by: Nitin Rawat
Signed-off-by: Can Guo
---
drivers/scsi/ufs/ufs-qcom.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/drivers/scsi/ufs/ufs-qcom.c
multiple times during error recovery.
Signed-off-by: Can Guo
---
drivers/scsi/ufs/ufshcd.c | 18 --
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 80620c8..013eb73 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b
Runtime and system suspend/resume can only come after hba probe invokes
platform_set_drvdata(pdev, hba), meaning hba cannot be NULL in these PM
callbacks, so remove the checks of !hba.
Signed-off-by: Can Guo
---
drivers/scsi/ufs/ufshcd.c | 21 -
1 file changed, 21 deletions
ed to fix it before move on - all the UFS3.1 HPB parts which I
tested
over the last few weeks are screwed due to this... I don't care
where/how
you want to get it fixed in next version.
In my case, which may not be a valid fix, I simply hack the code as
below
and it works for me.
- put_unaligned_be64(ppn, &cdb[6]);
+ memcpy(&cdb[6], &ppn, sizeof(u64));
Thanks,
Can Guo.
thanks,
Bean
t(). -EWOULDBLOCK means there is no available tags for
this
request. -EBUSY means failed on blk_queue_enter(). To overcome
starvation
of map request, we can try N times in heavy traffic situation (maybe
N=3?).
LGTM. You make the call.
Regards,
Can Guo.
Thanks,
Daejun
On 2021-02-08 16:16, Bean Huo wrote:
On Fri, 2021-02-05 at 11:29 +0800, Can Guo wrote:
> + return ppn_table[offset];
> +}
> +
> +static void
> +ufshpb_get_pos_from_lpn(struct ufshpb_lu *hpb, unsigned long lpn,
> int
> *rgn_idx,
> + in
o get a request from the queue - that shall pull down the
efficiency of one map_work(), that may hurt random performance...
Can Guo.
int blk_queue_enter(struct request_queue *q, blk_mq_req_flags_t flags)
{
const bool pm = flags & BLK_MQ_REQ_PM;
while (true
id
hang?
That won't work - BLK_MQ_REQ_NOWAIT allows one to fast fail from
blk_mq_get_tag(),
but blk_queue_enter() comes before __blk_mq_alloc_request();
Regards,
Can Guo.
Thanks,
Daejun
The map_work 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.
Reviewed-by: Bart Van Assche
R
struct ufshpb_lu *h;
+ struct scsi_device *sdev;
+
+ shost_for_each_device(sdev, hba->host) {
I haven't test it yet, but this line shall cause recursive spin lock -
in current code base, ufshpb_rsp_upiu() is called with host_lock held.
Regards,
Can Guo.
+
quot;HPB Buffer Read" cmd are in big-endian byte ordering.
If Micron FW team is right, I am pretty sure that you would have seen
random read performance regression on Micron UFS devices caused by
invalid HPB entry format in HPB Read cmd UPIU (which leads to L2P cache
miss in device side all the time) during your test.
Can Guo.
Thanks,
Bean
Thanks,
Avri
The map_work 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.
Reviewed-by: Bart Van Assche
R
On 2021-02-01 10:39, Bart Van Assche wrote:
On 1/28/21 9:57 PM, Can Guo wrote:
On 2021-01-29 11:15, Bart Van Assche wrote:
On 1/27/21 8:16 PM, Can Guo wrote:
In __ufshcd_issue_tm_cmd(), it is not right to use hba->nutrs +
req->tag as
the Task Tag in one TMR UPIU. Directly use req->t
SCSI command.
In the HPB version 1.0, the maximum read I/O size that can be converted
to
HPB read is 4KB.
The dirty map of the active sub-region prevents an incorrect HPB read
that
has stale physical page number which is updated by previous write I/O.
Reviewed-by: Can Guo
Reviewed-by: Bart Van
On 2021-01-29 14:06, Can Guo wrote:
On 2021-01-29 11:20, Bart Van Assche wrote:
On 1/27/21 8:16 PM, Can Guo wrote:
ufshcd_compl_tm() looks for all 0 bits in the
REG_UTP_TASK_REQ_DOOR_BELL
and call complete() for each req who has the req->end_io_data set.
There
can be a race condition btw
On 2021-01-29 11:20, Bart Van Assche wrote:
On 1/27/21 8:16 PM, Can Guo wrote:
ufshcd_compl_tm() looks for all 0 bits in the
REG_UTP_TASK_REQ_DOOR_BELL
and call complete() for each req who has the req->end_io_data set.
There
can be a race condition btw tmc send/compl, because the
1 - 100 of 539 matches
Mail list logo