block: adjust the judgment order in submit_bio
PATCH 1/1 block: adjust the judgment order in submit_bio
From: Liu Song <[email protected]>
BIO_WORKINGSET is rarer than read, so adjust to the first one to judge.
--- block/blk-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
block/blk-core.c +2 -2
@@ -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);
Signature · 1 line
1.8.3.1
Quoted 3 lines · Liu Song
From: Liu Song <[email protected]>
BIO_WORKINGSETis 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.
Quoted 6 lines
Quoted 3 lines
From: Liu Song <[email protected]>
BIO_WORKINGSETis 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