Main-line Linux kernel tree http://www.kernel.org
Go to file
David Jeffery 106397376c sbitmap: fix batching wakeup
Current code supposes that it is enough to provide forward progress by
just waking up one wait queue after one completion batch is done.

Unfortunately this way isn't enough, cause waiter can be added to wait
queue just after it is woken up.

Follows one example(64 depth, wake_batch is 8)

1) all 64 tags are active

2) in each wait queue, there is only one single waiter

3) each time one completion batch(8 completions) wakes up just one
   waiter in each wait queue, then immediately one new sleeper is added
   to this wait queue

4) after 64 completions, 8 waiters are wakeup, and there are still 8
   waiters in each wait queue

5) after another 8 active tags are completed, only one waiter can be
   wakeup, and the other 7 can't be waken up anymore.

Turns out it isn't easy to fix this problem, so simply wakeup enough
waiters for single batch.

Cc: Kemeng Shi <shikemeng@huaweicloud.com>
Cc: Chengming Zhou <zhouchengming@bytedance.com>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: David Jeffery <djeffery@redhat.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Gabriel Krisman Bertazi <krisman@suse.de>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Link: https://lore.kernel.org/r/20230721095715.232728-1-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-07-21 11:40:20 -06:00
arch Scope-based Resource Management infrastructure 2023-07-04 13:50:38 -07:00
block blk-iocost: skip empty flush bio in iocost 2023-07-20 14:02:17 -06:00
certs
crypto
Documentation More power management updates for 6.5-rc1 2023-07-04 11:22:50 -07:00
drivers nvme-pci: fix DMA direction of unmapping integrity data 2023-07-13 08:16:07 -07:00
fs afs: Fix accidental truncation when storing data 2023-07-04 12:24:32 -07:00
include blk-mq: delete dead struct blk_mq_hw_ctx->queued field 2023-07-20 13:29:25 -06:00
init
io_uring io_uring-6.5-2023-07-03 2023-07-03 18:43:10 -07:00
ipc
kernel module: fix init_module_from_file() error handling 2023-07-04 10:17:11 -07:00
lib sbitmap: fix batching wakeup 2023-07-21 11:40:20 -06:00
LICENSES
mm gup: make the stack expansion warning a bit more targeted 2023-07-05 09:33:31 -07:00
net
rust
samples Char/Misc and other driver subsystem updates for 6.5-rc1 2023-07-03 12:46:47 -07:00
scripts Scope-based Resource Management infrastructure 2023-07-04 13:50:38 -07:00
security Scope-based Resource Management infrastructure 2023-07-04 13:50:38 -07:00
sound
tools virtio: features, fixes, cleanups 2023-07-03 15:38:26 -07:00
usr
virt ARM64: 2023-07-03 15:32:22 -07:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore Revert ".gitignore: ignore *.cover and *.mbx" 2023-07-04 15:05:12 -07:00
.mailmap
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS power supply and reset changes for the 6.5 series 2023-07-03 17:23:16 -07:00
Makefile Scope-based Resource Management infrastructure 2023-07-04 13:50:38 -07:00
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 Restructured Text 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.