All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] block: adjust the judgment order in submit_bio
@ 2022-06-15  9:47 Liu Song
  2022-06-15 11:01 ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Liu Song @ 2022-06-15  9:47 UTC (permalink / raw)
  To: axboe; +Cc: linux-block

From: Liu Song <liusong@linux.alibaba.com>

BIO_WORKINGSET is rarer than read, so adjust to the first one to judge.

Signed-off-by: Liu Song <liusong@linux.alibaba.com>
---
 block/blk-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/block/blk-core.c b/block/blk-core.c
index 06ff5bb..7b6809b 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -901,8 +901,8 @@ void submit_bio(struct bio *bio)
 	 * the submitting cgroup IO-throttled, submission can be a significant
 	 * part of overall IO time.
 	 */
-	if (unlikely(bio_op(bio) == REQ_OP_READ &&
-	    bio_flagged(bio, BIO_WORKINGSET))) {
+	if (unlikely(bio_flagged(bio, BIO_WORKINGSET) &&
+		bio_op(bio) == REQ_OP_READ)) {
 		unsigned long pflags;
 
 		psi_memstall_enter(&pflags);
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] block: adjust the judgment order in submit_bio
  2022-06-15  9:47 [PATCH] block: adjust the judgment order in submit_bio Liu Song
@ 2022-06-15 11:01 ` Christoph Hellwig
  2022-06-17  1:22   ` liusong
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2022-06-15 11:01 UTC (permalink / raw)
  To: Liu Song; +Cc: axboe, linux-block

On Wed, Jun 15, 2022 at 05:47:22PM +0800, Liu Song wrote:
> From: Liu Song <liusong@linux.alibaba.com>
> 
> BIO_WORKINGSET is rarer than read, so adjust to the first one to judge.

Can you explain how this matters at all?  The right thing is of course
to get rid of this check and I need to finish the series to do that.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] block: adjust the judgment order in submit_bio
  2022-06-15 11:01 ` Christoph Hellwig
@ 2022-06-17  1:22   ` liusong
  0 siblings, 0 replies; 3+ messages in thread
From: liusong @ 2022-06-17  1:22 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: axboe, linux-block

>> From: Liu Song <liusong@linux.alibaba.com>
>> 
>> BIO_WORKINGSET is rarer than read, so adjust to the first one to judge.
>
> Can you explain how this matters at all?  The right thing is of course
> to get rid of this check and I need to finish the series to do that.

Hi
    This change do not involve functional changes, I just feel that it needs to
be emphasized that for example, the io triggered by refault is much less than
the read.

Thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-17  1:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-15  9:47 [PATCH] block: adjust the judgment order in submit_bio Liu Song
2022-06-15 11:01 ` Christoph Hellwig
2022-06-17  1:22   ` liusong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.