From: Daejun Park <daejun7.park@samsung.com>
To: Bart Van Assche <bvanassche@acm.org>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Jens Axboe <axboe@kernel.dk>, Christoph Hellwig <hch@lst.de>,
Jaegeuk Kim <jaegeuk@kernel.org>,
ALIM AKHTAR <alim.akhtar@samsung.com>,
"avri.altman@wdc.com" <avri.altman@wdc.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: RE:(2) [PATCH] scsi: ufs: mark HPB support as BROKEN
Date: Wed, 27 Oct 2021 07:22:35 +0900 [thread overview]
Message-ID: <20211026222235epcms2p75cf431e642eb3134da775d0ff2c8ede5@epcms2p7> (raw)
In-Reply-To: <679b4d3b-778e-47cd-d53f-f7bf77315f7c@acm.org>
Hi Bart,
>On 10/26/21 11:27 AM, Martin K. Petersen wrote:
>>> Agreed, that was my initial proposed solution: get rid of the write
>>> buffer optimzation now to fix the API abuse and see if we can add it
>>> back in a more acceptable form later.
>>
>> Doesn't matter to me whether we back out the 2.0 stuff or mark it as
>> broken. I merely objected to reverting all of HPB since I don't think
>> that would solve anything.
>>
>> But obviously we'll need a patch to fix 5.15 ASAP...
>
>I do not have access to a test setup that supports HPB.
>
>If blk_insert_cloned_request() is moved into the device mapper then I
>think that blk_mq_request_issue_directly() will need to be exported. How
>about the (totally untested) patch below for removing the
>blk_insert_cloned_request() call from the UFS-HPB code?
I will test this code works on real device.
Thanks,
Daejun
>
>Thanks,
>
>Bart.
>
>
>---
> block/blk-mq.c | 1 +
> block/blk-mq.h | 1 -
> drivers/scsi/ufs/ufshpb.c | 2 +-
> include/linux/blkdev.h | 1 +
> 4 files changed, 3 insertions(+), 2 deletions(-)
>
>diff --git a/block/blk-mq.c b/block/blk-mq.c
>index 108a352051be..186321f450f6 100644
>--- a/block/blk-mq.c
>+++ b/block/blk-mq.c
>@@ -2084,6 +2084,7 @@ blk_status_t blk_mq_request_issue_directly(struct request *rq, bool last)
>
> return ret;
> }
>+EXPORT_SYMBOL_GPL(blk_mq_request_issue_directly);
>
> void blk_mq_try_issue_list_directly(struct blk_mq_hw_ctx *hctx,
> struct list_head *list)
>diff --git a/block/blk-mq.h b/block/blk-mq.h
>index d08779f77a26..ffba52189b18 100644
>--- a/block/blk-mq.h
>+++ b/block/blk-mq.h
>@@ -74,7 +74,6 @@ void blk_mq_insert_requests(struct blk_mq_hw_ctx *hctx, struct blk_mq_ctx *ctx,
> struct list_head *list);
>
> /* Used by blk_insert_cloned_request() to issue request directly */
>-blk_status_t blk_mq_request_issue_directly(struct request *rq, bool last);
> void blk_mq_try_issue_list_directly(struct blk_mq_hw_ctx *hctx,
> struct list_head *list);
>
>diff --git a/drivers/scsi/ufs/ufshpb.c b/drivers/scsi/ufs/ufshpb.c
>index 66b19500844e..458eadcb604f 100644
>--- a/drivers/scsi/ufs/ufshpb.c
>+++ b/drivers/scsi/ufs/ufshpb.c
>@@ -547,7 +547,7 @@ static int ufshpb_execute_pre_req(struct ufshpb_lu *hpb, struct scsi_cmnd *cmd,
> read_id);
> rq->cmd_len = scsi_command_size(rq->cmd);
>
>- if (blk_insert_cloned_request(q, req) != BLK_STS_OK)
>+ if (blk_mq_request_issue_directly(req, true) != BLK_STS_OK)
> return -EAGAIN;
>
> hpb->stats.pre_req_cnt++;
>diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
>index 12b9dbcc980e..f203c7ea205b 100644
>--- a/include/linux/blkdev.h
>+++ b/include/linux/blkdev.h
>@@ -867,6 +867,7 @@ extern int blk_rq_prep_clone(struct request *rq, struct request *rq_src,
> extern void blk_rq_unprep_clone(struct request *rq);
> extern blk_status_t blk_insert_cloned_request(struct request_queue *q,
> struct request *rq);
>+blk_status_t blk_mq_request_issue_directly(struct request *rq, bool last);
> int blk_rq_append_bio(struct request *rq, struct bio *bio);
> extern void blk_queue_split(struct bio **);
> extern int blk_queue_enter(struct request_queue *q, blk_mq_req_flags_t flags);
>
>
>
next prev parent reply other threads:[~2021-10-26 22:22 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-26 7:12 [PATCH] scsi: ufs: mark HPB support as BROKEN Christoph Hellwig
2021-10-26 7:18 ` Hannes Reinecke
2021-10-26 7:24 ` Damien Le Moal
2021-10-26 13:04 ` James Bottomley
2021-10-26 16:36 ` Bart Van Assche
2021-10-26 17:19 ` James Bottomley
2021-10-26 17:25 ` Jens Axboe
2021-10-26 18:05 ` Bart Van Assche
2021-10-26 18:10 ` Jens Axboe
2021-10-26 18:18 ` James Bottomley
2021-10-26 18:27 ` Martin K. Petersen
2021-10-26 20:10 ` Bart Van Assche
2021-10-27 5:27 ` Christoph Hellwig
2021-10-27 12:20 ` James Bottomley
2021-10-28 20:21 ` Bart Van Assche
2021-10-28 20:33 ` James Bottomley
2021-10-28 20:53 ` Bart Van Assche
[not found] ` <CGME20211028205342epcas2p40838e84438572adf052d106dc82e35ff@epcms2p6>
2021-10-28 21:14 ` Daejun Park
2021-10-27 13:16 ` Bart Van Assche
2021-10-27 14:12 ` Keith Busch
2021-10-27 14:38 ` Jens Axboe
2021-10-27 14:43 ` James Bottomley
2021-10-27 15:03 ` Ming Lei
2021-10-27 15:06 ` Jens Axboe
2021-10-27 15:16 ` Ming Lei
2021-10-27 15:44 ` Martin K. Petersen
2021-10-27 15:58 ` Ming Lei
2021-10-27 16:16 ` Keith Busch
2021-10-27 16:19 ` Jens Axboe
2021-10-28 0:42 ` Ming Lei
[not found] ` <CGME20211028004244epcas2p1f2212bf94ef861dfa6cd082c3cbb1803@epcms2p1>
2021-10-28 1:10 ` Daejun Park
2021-10-28 2:07 ` Ming Lei
2021-10-27 16:59 ` Martin K. Petersen
2021-10-27 15:35 ` Martin K. Petersen
2021-10-27 15:40 ` Jens Axboe
2021-10-27 16:16 ` Martin K. Petersen
2021-10-27 17:01 ` Bart Van Assche
2021-10-28 1:32 ` Ming Lei
[not found] ` <CGME20211026201057epcas2p4174ba542fd5abe7ec8f4469f8c60303a@epcms2p7>
2021-10-26 22:22 ` Daejun Park [this message]
2021-10-29 10:53 ` Christoph Hellwig
2021-10-29 11:39 ` James Bottomley
2021-10-29 13:35 ` Avri Altman
2021-10-29 13:44 ` James Bottomley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211026222235epcms2p75cf431e642eb3134da775d0ff2c8ede5@epcms2p7 \
--to=daejun7.park@samsung.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=hch@lst.de \
--cc=jaegeuk@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).