mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jinlong Chen <nickyc975@zju.edu.cn>
To: axboe@kernel.dk
Cc: hch@lst.de, linux-block@vger.kernel.org,
	linux-kernel@vger.kernel.org, nickyc975@zju.edu.cn
Subject: [RFC PATCH 0/2] elevator: restore old io scheduler on failure in elevator_switch
Date: Fri, 18 Nov 2022 20:09:52 +0800	[thread overview]
Message-ID: <cover.1668772991.git.nickyc975@zju.edu.cn> (raw)

Hi!

These two patches bring back the fallback feature in elevator_switch if
switching to the new io scheduler failed.

elevator_switch contains the fallback logic in sq era, but it was removed
when moving to mq (commit: a1ce35fa49852db60fc6e268038530be533c5b15),
leaving the document mismatched with the behavior. As far as I can see,
restoring the old io scheduler is more reasonable than just leaving the
scheduler none, hence there is the series.

However, now it's hard to keep the old io scheduler untouched. We can only
re-initialize the old scheduler if we want to restore it, and the
statistics the old scheduler collected would be lost. Besides, the
restoration itself might fail too. I have no idea whether the two problems
matter. Any comments are welcomed.

Jinlong Chen (2):
  elevator: add a helper for applying scheduler to request_queue
  elevator: restore the old io scheduler if failed to switch to the new
    one

 block/elevator.c | 49 +++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 40 insertions(+), 9 deletions(-)

-- 
2.31.1


             reply	other threads:[~2022-11-18 12:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-18 12:09 Jinlong Chen [this message]
2022-11-18 12:09 ` [RFC PATCH 1/2] elevator: add a helper for applying scheduler to request_queue Jinlong Chen
2022-11-18 12:09 ` [RFC PATCH 2/2] elevator: restore the old io scheduler if failed to switch to the new one Jinlong Chen
2022-11-21  7:13 ` [RFC PATCH 0/2] elevator: restore old io scheduler on failure in elevator_switch Christoph Hellwig
2022-11-22 12:14   ` Jinlong Chen
2022-11-22 12:24     ` Christoph Hellwig
2022-11-22 12:44       ` Jinlong Chen

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=cover.1668772991.git.nickyc975@zju.edu.cn \
    --to=nickyc975@zju.edu.cn \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®