Skip to content

RFC elevator: restore old io scheduler on failure in elevator_switch

Jinlong Chen linux-block lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2elevator: add a helper for applying scheduler to request_queueblock/elevator.c+16 -60 replies
2/2elevator: restore the old io scheduler if failed to switch to the new oneblock/elevator.c+25 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/2] elevator: restore old io scheduler on failure in elevator_switch

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(-)
Signature · 1 line
2.31.1