linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aleksei Zakharov <zakharov.a.g@yandex.ru>
To: axboe@kernel.dk
Cc: linux-block@vger.kernel.org, Aleksei Zakharov <zakharov.a.g@yandex.ru>
Subject: [PATCH] block: avoid setting wbt_lat_usec to current value
Date: Mon, 11 Feb 2019 13:10:34 +0300	[thread overview]
Message-ID: <1549879834-24837-1-git-send-email-zakharov.a.g@yandex.ru> (raw)

There's no reason to set wbt min lat and freeze request queue
if current value is the same.

Signed-off-by: Aleksei Zakharov <zakharov.a.g@yandex.ru>
---
 block/blk-sysfs.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index 590d1ef..d0df883 100644
--- a/block/blk-sysfs.c
+++ b/block/blk-sysfs.c
@@ -468,6 +468,9 @@ static ssize_t queue_wb_lat_store(struct request_queue *q, const char *page,
 	else if (val >= 0)
 		val *= 1000ULL;
 
+	if (wbt_get_min_lat(q) == val)
+		return count;
+
 	/*
 	 * Ensure that the queue is idled, in case the latency update
 	 * ends up either enabling or disabling wbt completely. We can't
-- 
2.7.4


             reply	other threads:[~2019-02-11 10:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-11 10:10 Aleksei Zakharov [this message]
2019-02-11 10:31 ` [PATCH] block: avoid setting wbt_lat_usec to current value Johannes Thumshirn
2019-02-11 15:20 ` Jens Axboe

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=1549879834-24837-1-git-send-email-zakharov.a.g@yandex.ru \
    --to=zakharov.a.g@yandex.ru \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    /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).