Patch "blk-wbt: account flush requests correctly" has been added to the 4.15-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
blk-wbt: account flush requests correctly
to the 4.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
blk-wbt-account-flush-requests-correctly.patch
and it can be found in the queue-4.15 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
5235553d821433e1f4fa720fd025d2c4b7ee9994Mon Sep 17 00:00:00 2001
From: Jens Axboe <[email protected]>
Date: Mon, 5 Feb 2018 13:16:56 -0700
Subject: blk-wbt: account flush requests correctly
From: Jens Axboe <[email protected]>
commit 5235553d821433e1f4fa720fd025d2c4b7ee9994 upstream.
Mikulas reported a workload that saw bad performance, and figured out what it was due to various other types of requests being accounted as reads. Flush requests, for instance. Due to the high latency of those, we heavily throttle the writes to keep the latencies in balance. But they really should be accounted as writes.
Fix this by checking the exact type of the request. If it's a read, account as a read, if it's a write or a flush, account as a write. Any other request we disregard. Previously everything would have been mistakenly accounted as reads.
--- block/blk-wbt.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
block/blk-wbt.c +9 -1
@@ -697,7 +697,15 @@ u64 wbt_default_latency_nsec(struct requstatic int wbt_data_dir (const struct request *rq) { -return rq_data_dir (rq); +const int op =req_op (rq); + +if (op ==REQ_OP_READ ) +return READ ; +else if (op ==REQ_OP_WRITE || op ==REQ_OP_FLUSH ) +return WRITE ; + +/* don't account */ +return -1 ; }int wbt_init (struct request_queue *q)
Patches currently in stable-queue which might be from [email protected] are
queue-4.15/blk-wbt-account-flush-requests-correctly.patch