Go to file
Yu Kuai 7d337eef4a blk-mq: fix elevator depth_updated method
Current depth_updated has some problems:

1) depth_updated() will be called for each hctx, while all elevators
will update async_depth for the disk level, this is not related to hctx;
2) In blk_mq_update_nr_requests(), if previous hctx update succeed and
this hctx update failed, q->nr_requests will not be updated, while
async_depth is already updated with new nr_reqeuests in previous
depth_updated();
3) All elevators are using q->nr_requests to calculate async_depth now,
however, q->nr_requests is still the old value when depth_updated() is
called from blk_mq_update_nr_requests();

Those problems are first from error path, then mq-deadline, and recently
for bfq and kyber, fix those problems by:

- pass in request_queue instead of hctx;
- move depth_updated() after q->nr_requests is updated in
  blk_mq_update_nr_requests();
- add depth_updated() call inside init_sched() method to initialize
  async_depth;
- remove init_hctx() method for mq-deadline and bfq that is useless now;

Fixes: 77f1e0a52d ("bfq: update internal depth state when queue depth changes")
Fixes: 39823b47bb ("block/mq-deadline: Fix the tag reservation code")
Fixes: 42e6c6ce03 ("lib/sbitmap: convert shallow_depth from one word to the whole sbitmap")
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Li Nan <linan122@huawei.com>
Reviewed-by: Nilay Shroff <nilay@linux.ibm.com>
Link: https://lore.kernel.org/r/20250821060612.1729939-2-yukuai1@huaweicloud.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2025-09-05 13:52:52 -06:00
Documentation switching ->getgeo() from struct block_device to struct gendisk 2025-09-03 15:15:43 -06:00
LICENSES
arch switching ->getgeo() from struct block_device to struct gendisk 2025-09-03 15:15:43 -06:00
block blk-mq: fix elevator depth_updated method 2025-09-05 13:52:52 -06:00
certs
crypto
drivers ublk: inline __ublk_ch_uring_cmd() 2025-09-03 17:35:54 -06:00
fs
include switching ->getgeo() from struct block_device to struct gendisk 2025-09-03 15:15:43 -06:00
init
io_uring
ipc
kernel - Fix a case where the events throttling logic operates on inactive events 2025-08-24 10:13:05 -04:00
lib
mm
net
rust rust: block: add remote completion to `Request` 2025-09-02 05:23:56 -06:00
samples rust: configfs: re-export `configfs_attrs` from `configfs` module 2025-09-02 05:23:56 -06:00
scripts
security
sound
tools
usr
virt
.clang-format
.clippy.toml
.cocciconfig
.editorconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
.pylintrc
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS rnull: move driver to separate directory 2025-09-02 05:23:56 -06:00
Makefile Linux 6.17-rc3 2025-08-24 12:04:12 -04:00
README

README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the reStructuredText markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.