From: Liu Song <liusong@xxxxxxxxxxxxxxxxx> BIO_WORKINGSET is rarer than read, so adjust to the first one to judge. Signed-off-by: Liu Song <liusong@xxxxxxxxxxxxxxxxx> --- 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