On Wed, Jul 02, 2025 at 06:33:59PM +0200, Daniel Wagner wrote:
> When isolcpus=io_queue is enabled, and the last housekeeping CPU for a
> given hctx goes offline, there would be no CPU left to handle I/O. To
> prevent I/O stalls, prevent offlining housekeeping CPUs that are still
> serving isolated
On Wed, Jun 11, 2025 at 12:14:54PM +, Hazem Mohamed Abuelfotoh wrote:
> This reverts commit e70c301faece15b618e54b613b1fd6ece3dd05b4.
>
> Commit ("block: don't reorder requests in
> blk_add_rq_to_plug") reversed how requests are stored in the blk_plug
> list, this had significant impact on bi
t print
> a (not very descriptive) log line when this happens.
>
> Signed-off-by: Uday Shankar
Reviewed-by: Ming Lei
Thanks,
Ming
tps://lore.kernel.org/linux-block/aDgwGoGCEpwd1mFY@fedora/
>
> Suggested-by: Ming Lei
> Signed-off-by: Uday Shankar
> ---
> tools/testing/selftests/ublk/Makefile | 1 +
> tools/testing/selftests/ublk/test_common.sh| 5
> tools/testing/selftests/ublk/test_stre
alleviating the issue
> described above.
>
> Add the new UBLK_F_PER_IO_DAEMON feature to ublk_drv, which ublk servers
> can use to essentially test for the presence of this change and tailor
> their behavior accordingly.
>
> Signed-off-by: Uday Shankar
> Reviewed-by: Caleb Sander Mateos
Reviewed-by: Ming Lei
Thanks,
Ming
On Tue, May 27, 2025 at 05:01:24PM -0600, Uday Shankar wrote:
> Currently, ublk_drv associates to each hardware queue (hctx) a unique
> task (called the queue's ubq_daemon) which is allowed to issue
> COMMIT_AND_FETCH commands against the hctx. If any other task attempts
> to do so, the command fai
ons, as the new
> UBLK_F_PER_IO_DAEMON feature renders that concept obsolete.
>
> Signed-off-by: Uday Shankar
Reviewed-by: Ming Lei
Thanks,
Ming
the future, the last check above may be strengthened to "verify that
> all ublk server threads handle the same amount of I/O." However, this
> requires some adjustments/bugfixes to tag allocation, so this work is
> postponed to a followup.
>
> Signed-off-by: Uday Shankar
Reviewed-by: Ming Lei
Thanks,
Ming
+130,7 @@ struct ublk_io {
> unsigned short refs;/* used by target code only */
>
> int tag;
> + int buf_index;
Both the above two can be 'unsigned short', otherwise:
Reviewed-by: Ming Lei
t will
> allocate from the io's thread's ring instead.
>
> Signed-off-by: Uday Shankar
Reviewed-by: Ming Lei
Thanks,
Ming
On Wed, May 07, 2025 at 03:49:41PM -0600, Uday Shankar wrote:
> Add support in kublk for decoupled ublk_queues and ublk server threads.
> kublk now has two modes of operation:
>
> - (preexisting mode) threads and queues are paired 1:1, and each thread
> services all the I/Os of one queue
> - (ne
On Wed, May 07, 2025 at 03:49:41PM -0600, Uday Shankar wrote:
> Add support in kublk for decoupled ublk_queues and ublk server threads.
> kublk now has two modes of operation:
>
> - (preexisting mode) threads and queues are paired 1:1, and each thread
> services all the I/Os of one queue
> - (ne
}
>
> - qinfo[i].q = &dev->q[i];
> - qinfo[i].queue_sem = &queue_sem;
> - qinfo[i].affinity = &affinity_buf[i];
> - pthread_create(&dev->q[i].thread, NULL,
> + tinfo[i].dev = dev;
> + tinfo[i].idx = i;
> + tinfo[i].ready = &ready;
> + tinfo[i].affinity = &affinity_buf[i];
> + pthread_create(&dev->threads[i].thread, NULL,
> ublk_io_handler_fn,
> - &qinfo[i]);
> + &tinfo[i]);
> }
>
> for (i = 0; i < dinfo->nr_hw_queues; i++)
> - sem_wait(&queue_sem);
> - free(qinfo);
> + sem_wait(&ready);
> + free(tinfo);
> free(affinity_buf);
>
> /* everything is fine now, start us */
> @@ -889,7 +902,7 @@ static int ublk_start_daemon(const struct dev_ctx *ctx,
> struct ublk_dev *dev)
>
> /* wait until we are terminated */
> for (i = 0; i < dinfo->nr_hw_queues; i++)
> - pthread_join(dev->q[i].thread, &thread_ret);
> + pthread_join(dev->threads[i].thread, &thread_ret);
> fail:
> for (i = 0; i < dinfo->nr_hw_queues; i++)
> ublk_queue_deinit(&dev->q[i]);
> diff --git a/tools/testing/selftests/ublk/kublk.h
> b/tools/testing/selftests/ublk/kublk.h
> index
> 7c912116606429215af7dbc2a8ce6b40ef89bfbd..9eb2207fcebe96d34488d057c881db262b9767b3
> 100644
> --- a/tools/testing/selftests/ublk/kublk.h
> +++ b/tools/testing/selftests/ublk/kublk.h
> @@ -51,10 +51,12 @@
> #define UBLK_IO_MAX_BYTES (1 << 20)
> #define UBLK_MAX_QUEUES_SHIFT5
> #define UBLK_MAX_QUEUES (1 << UBLK_MAX_QUEUES_SHIFT)
> +#define UBLK_MAX_THREADS_SHIFT 5
> +#define UBLK_MAX_THREADS (1 << UBLK_MAX_THREADS_SHIFT)
> #define UBLK_QUEUE_DEPTH1024
>
> #define UBLK_DBG_DEV(1U << 0)
> -#define UBLK_DBG_QUEUE (1U << 1)
> +#define UBLK_DBG_THREAD (1U << 1)
> #define UBLK_DBG_IO_CMD (1U << 2)
> #define UBLK_DBG_IO (1U << 3)
> #define UBLK_DBG_CTRL_CMD (1U << 4)
> @@ -62,6 +64,7 @@
>
> struct ublk_dev;
> struct ublk_queue;
> +struct ublk_thread;
>
> struct stripe_ctx {
> /* stripe */
> @@ -120,6 +123,8 @@ struct ublk_io {
> unsigned short refs;/* used by target code only */
>
> struct ublk_queue *q;
> + struct ublk_thread *t;
Given you have to take static mapping between queue/tag and thread,
'struct ublk_thread' should have been figured out runtime easily,
then we can save 8 bytes, also avoid memory indirect dereference.
sizeof(struct ublk_io) need to be held in single L1 cacheline.
But it can be one followup.
Reviewed-by: Ming Lei
thanks,
Ming
lly need to happen on the thread that will use the ring; that is
> separated into a separate ublk_thread_init which is still called by each
> I/O handler thread.
>
> Signed-off-by: Uday Shankar
Reviewed-by: Ming Lei
thanks,
Ming
On Wed, May 07, 2025 at 03:49:38PM -0600, Uday Shankar wrote:
> We currently have a helper ublk_queue_alloc_sqes which the ublk targets
> use to allocate SQEs for their own operations. However, as we move
> towards decoupled ublk_queues and ublk server threads, this helper does
> not make sense any
he
> associated SQE's user_data.
>
> Signed-off-by: Uday Shankar
Looks fine,
Reviewed-by: Ming Lei
Thanks,
Ming
On Wed, May 07, 2025 at 03:49:35PM -0600, Uday Shankar wrote:
> Currently, ublk_drv associates to each hardware queue (hctx) a unique
> task (called the queue's ubq_daemon) which is allowed to issue
> COMMIT_AND_FETCH commands against the hctx. If any other task attempts
> to do so, the command fai
On Wed, May 07, 2025 at 03:49:36PM -0600, Uday Shankar wrote:
> In update_alloc_hint_after_get, we wrap the new hint back to 0 one bit
> too early. This breaks round robin tag allocation (BLK_MQ_F_TAG_RR) -
> some tags get skipped, so we don't get round robin tags even in the
> simple case of singl
On Thu, Apr 24, 2025 at 08:19:48PM +0200, Daniel Wagner wrote:
> When isolcpus=io_queue is enabled, and the last housekeeping CPU for a
> given hctx would go offline, there would be no CPU left which handles
> the IOs. To prevent IO stalls, prevent offlining housekeeping CPUs which
> are still seve
On Thu, Apr 24, 2025 at 08:19:47PM +0200, Daniel Wagner wrote:
> When isolcpus=io_queue is enabled all hardware queues should run on
> the housekeeping CPUs only. Thus ignore the affinity mask provided by
> the driver. Also we can't use blk_mq_map_queues because it will map all
> CPUs to first hctx
ly() is used when the isolcpus command line
> + * argument is used with managed_irq option. In this case only the
s/managed_irq/io_queue
> + * housekeeping CPUs are considered.
I'd suggest to highlight the difference, which is one fundamental thing,
originally all CPUs are covered, now only housekeeping CPUs are
distributed.
Otherwise, looks fine to me:
Reviewed-by: Ming Lei
Thanks,
Ming
On Fri, Apr 25, 2025 at 09:32:16AM +0200, Daniel Wagner wrote:
> On Fri, Apr 25, 2025 at 08:26:22AM +0200, Hannes Reinecke wrote:
> > On 4/24/25 20:19, Daniel Wagner wrote:
> > > Multiqueue drivers spreading IO queues on all CPUs for optimal
> > > performance. The drivers are not aware of the CPU i
On Thu, Apr 24, 2025 at 08:19:44PM +0200, Daniel Wagner wrote:
> Multiqueue devices should only allocate queues for the housekeeping CPUs
> when isolcpus=io_queue is set. This avoids that the isolated CPUs get
> disturbed with OS workload.
With commit log fixed:
Reviewed-by: Ming Lei
hat isn't what the patch is
doing.
Otherwise, looks fine to me:
Reviewed-by: Ming Lei
Thanks,
Ming
On Thu, Apr 24, 2025 at 08:19:42PM +0200, Daniel Wagner wrote:
> Multiqueue devices should only allocate queues for the housekeeping CPUs
> when isolcpus=io_queue is set. This avoids that the isolated CPUs get
> disturbed with OS workload.
The commit log needs to be updated:
- io_queue isn't intr
t log needs to be updated.
Otherwise, looks fine:
Reviewed-by: Ming Lei
Thanks,
Ming
which can be less than numgrps.
> *
> * Try to put close CPUs from viewpoint of CPU and NUMA locality into
> * same group, and run two-stage grouping:
> @@ -344,7 +346,8 @@ static int __group_cpus_evenly(unsigned int startgrp,
> unsigned int numgrps,
> * We guarantee in the result
On Thu, Apr 24, 2025 at 08:19:39PM +0200, Daniel Wagner wrote:
> I've added back the isolcpus io_queue agrument. This avoids any semantic
> changes of managed_irq.
IMO, this is correct thing to do.
> I don't like it but I haven't found a
> better way to deal with it. Ming clearly stated managed_i
Jens decide
if it is fine to pass -Werror at default:
Reviewed-by: Ming Lei
Otherwise, it still can be enabled conditionally with default off.
Thanks,
Ming
o run under the kernel tree without installing
headers system wide, nice!
Reviewed-by: Ming Lei
Thanks,
Ming
On Mon, Apr 28, 2025 at 05:10:21PM -0600, Uday Shankar wrote:
> Convention dictates that tests should not log anything on success. Make
> test_generic_06 follow this convention.
>
> Signed-off-by: Uday Shankar
Reviewed-by: Ming Lei
Thanks,
Ming
On Mon, Apr 28, 2025 at 05:10:20PM -0600, Uday Shankar wrote:
> Compiler warnings can catch bugs at compile time. They can also produce
> annoying false positives. Due to this duality, the kernel provides
> CONFIG_WERROR so that the developer can choose whether or not they want
> compiler warnings
common.sh
> @@ -17,8 +17,8 @@ _get_disk_dev_t() {
> local minor
>
> dev=/dev/ublkb"${dev_id}"
> - major=$(stat -c '%Hr' "$dev")
> - minor=$(stat -c '%Lr' "$dev")
> + major="0x"$(stat -c '%t' "$dev")
> + minor="0x"$(stat -c '%T' "$dev")
Reviewed-by: Ming Lei
Thanks,
Ming
-O3 -Wl,-no-as-needed -Wall -Werror -I $(top_srcdir)
> LDLIBS += -lpthread -lm -luring
Reviewed-by: Ming Lei
Thanks,
Ming
On Mon, Apr 07, 2025 at 01:16:33PM -0600, Uday Shankar wrote:
> On Sat, Apr 05, 2025 at 10:59:29PM +0800, Ming Lei wrote:
> > On Thu, Apr 03, 2025 at 06:05:57PM -0600, Uday Shankar wrote:
> > > There are currently two ways in which ublk server exit is detected by
> > &g
could easily require it to be set as a prerequisite for these selftests,
> but since new applications should not be using the legacy opcodes, use
> the ioctl-encoded opcodes everywhere in kublk.
>
> Signed-off-by: Uday Shankar
Reviewed-by: Ming Lei
--
Ming
fy io_cmd_buf pointer type
>
> drivers/block/ublk_drv.c | 8
> tools/testing/selftests/ublk/kublk.c | 2 +-
> tools/testing/selftests/ublk/kublk.h | 4 ++--
> 3 files changed, 7 insertions(+), 7 deletions(-)
Reviewed-by: Ming Lei
Thanks,
Ming
new test (and all other selftests, and all
> ublksrv tests) pass:
>
> selftests: ublk: test_generic_04.sh
> dev id is 0
> dd: error writing '/dev/ublkb0': Input/output error
> 1+0 records in
> 0+0 records out
> 0 bytes copied, 0.0376731 s, 0.0 kB/s
> DEAD
> generic
new test (and all other selftests, and all
> ublksrv tests) pass:
>
> selftests: ublk: test_generic_04.sh
> dev id is 0
> dd: error writing '/dev/ublkb0': Input/output error
> 1+0 records in
> 0+0 records out
> 0 bytes copied, 0.0376731 s, 0.0 kB/s
> DEAD
> gene
On Mon, Mar 31, 2025 at 05:17:16PM -0600, Uday Shankar wrote:
> On Thu, Mar 27, 2025 at 09:23:21AM +0800, Ming Lei wrote:
> > On Wed, Mar 26, 2025 at 11:54:16AM -0600, Uday Shankar wrote:
> > > On Wed, Mar 26, 2025 at 01:38:35PM +0800, Ming Lei wrote:
> > > > On T
On Tue, Mar 25, 2025 at 04:19:34PM -0600, Uday Shankar wrote:
> There are currently two ways in which ublk server exit is detected by
> ublk_drv:
>
> 1. uring_cmd cancellation. If there are any outstanding uring_cmds which
>have not been completed to the ublk server when it exits, io_uring
>
On Wed, Mar 26, 2025 at 05:08:19PM -0600, Uday Shankar wrote:
> On Wed, Mar 26, 2025 at 12:56:56PM -0600, Uday Shankar wrote:
> > On Wed, Mar 26, 2025 at 11:54:16AM -0600, Uday Shankar wrote:
> > > > ublk_abort_requests() should be called only in case of queue dying,
> > > > since ublk server may o
On Wed, Mar 26, 2025 at 11:54:16AM -0600, Uday Shankar wrote:
> On Wed, Mar 26, 2025 at 01:38:35PM +0800, Ming Lei wrote:
> > On Tue, Mar 25, 2025 at 04:19:34PM -0600, Uday Shankar wrote:
> > > There are currently two ways in which ublk server exit is detected by
> > &g
On Tue, Mar 25, 2025 at 04:19:34PM -0600, Uday Shankar wrote:
> There are currently two ways in which ublk server exit is detected by
> ublk_drv:
>
> 1. uring_cmd cancellation. If there are any outstanding uring_cmds which
>have not been completed to the ublk server when it exits, io_uring
>
;
> }
>
> + signal(SIGCHLD, SIG_IGN);
Reviewed-by: Ming Lei
BTW, the SIGCHLD signal is ignored by default, looks it is good
to do it explicitly, if the -EINTR from io_uring_enter() can be avoided
in this way.
Thanks,
Ming
ic void ublk_ctrl_dump(struct ublk_dev *dev)
>
> ret = ublk_ctrl_get_params(dev, &p);
> if (ret < 0) {
> - ublk_err("failed to get params %m\n");
> + ublk_err("failed to get params %d %s\n", ret, strerror(-ret));
> return;
Reviewed-by: Ming Lei
--
Ming
On Mon, Mar 3, 2025 at 8:43 PM Ming Lei wrote:
>
> Hello Jens and guys,
>
> This patchset fixes several issues(1, 2, 4) and consolidate & improve
> the tests in the following ways:
>
> - support shellcheck and fixes all warning
>
> - misc cleanup
>
> - improve
On Mon, Mar 10, 2025 at 09:17:56AM -0600, Jens Axboe wrote:
> On 3/10/25 9:09 AM, Ming Lei wrote:
> > On Mon, Mar 3, 2025 at 8:43?PM Ming Lei wrote:
> >>
> >> Hello Jens and guys,
> >>
> >> This patchset fixes several issues(1, 2, 4) and consolidate &
More devices can be created in single tests, so simply remove all
ublk devices in _cleanup_test(), meantime remove the ${dev_id} argument
of _cleanup_test().
Signed-off-by: Ming Lei
---
tools/testing/selftests/ublk/test_common.sh | 2 +-
tools/testing/selftests/ublk/test_loop_01.sh | 2
Load ublk_drv module in _prep_test(), and unload it in _cleanup_test(),
so that test can always be done in consistent state.
Signed-off-by: Ming Lei
---
tools/testing/selftests/ublk/test_common.sh | 5 +
1 file changed, 5 insertions(+)
diff --git a/tools/testing/selftests/ublk
tests, ...)
Signed-off-by: Ming Lei
---
tools/testing/selftests/ublk/test_common.sh| 10 --
tools/testing/selftests/ublk/test_loop_01.sh | 2 +-
tools/testing/selftests/ublk/test_loop_02.sh | 2 +-
tools/testing/selftests/ublk/test_loop_03.sh | 2 +-
tools/testing/selftests
Add stress_test_01 for running IO vs. killing ublk server, so io_uring exit &
cancel code path can be covered, same with ublk's cancel code path.
Especially IO buffer lifetime is one big thing for ublk zero copy, the added
test can verify if this area works as expected.
Signed-off-by:
terminal shell.
Meantime always return error code from _add_ublk_dev().
Signed-off-by: Ming Lei
---
tools/testing/selftests/ublk/test_common.sh | 56
tools/testing/selftests/ublk/test_loop_01.sh | 1 +
tools/testing/selftests/ublk/test_loop_02.sh | 2 +-
tools/testing
Add stress_test_01 for running IO vs. removing device for verifying that
ublk device removal can work as expected when heavy IO workloads are in
progress.
null, loop and loop/zc are covered in this tests.
Signed-off-by: Ming Lei
---
tools/testing/selftests/ublk/Makefile | 2 +
tools
The argument of '-a' doesn't follow any value, so fix it by putting it
with '-z' together.
Fixes: ed5820a7e918 ("selftests: ublk: add ublk zero copy test")
Signed-off-by: Ming Lei
---
tools/testing/selftests/ublk/kublk.c | 2 +-
1 file changed, 1 insertion(+)
Add shellcheck, meantime fixes all warnings.
Signed-off-by: Ming Lei
---
tools/testing/selftests/ublk/Makefile| 3 ++
tools/testing/selftests/ublk/test_common.sh | 57 +++-
tools/testing/selftests/ublk/test_loop_01.sh | 10 ++--
tools/testing/selftests/ublk
Add --foreground command for helping to debug.
Signed-off-by: Ming Lei
---
tools/testing/selftests/ublk/kublk.c | 17 +
tools/testing/selftests/ublk/kublk.h | 1 +
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/ublk/kublk.c
b/tools
ange for overriding skip_code, libring uses 77 and
kselftests takes 4
Ming Lei (11):
selftests: ublk: make ublk_stop_io_daemon() more reliable
selftests: ublk: fix build failure
selftests: ublk: add --foreground command line
selftests: ublk: fix parsing '-a' argument
selfte
his way may reduce time of delete command a lot.
Signed-off-by: Ming Lei
---
tools/testing/selftests/ublk/kublk.c | 24 ++--
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/tools/testing/selftests/ublk/kublk.c
b/tools/testing/selftests/ublk/kublk.c
);
| ^~~~
| O_DIRECTORY
when trying to reuse this same utility for liburing test.
Signed-off-by: Ming Lei
---
tools/testing/selftests/ublk/kublk.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/ublk
On Fri, Feb 28, 2025 at 09:37:47AM -0700, Jens Axboe wrote:
> On 2/28/25 9:19 AM, Ming Lei wrote:
> > Hello Jens,
> >
> > This patchset adds ublk kernel selftests, which is very handy for
> > developer for verifying kernel change, especially ublk heavily depends
> &g
Enable zero copy on file backed target, meantime add one fio test for
covering write verify, another test for mkfs/mount/umount.
Signed-off-by: Ming Lei
---
tools/testing/selftests/ublk/Makefile| 2 +
tools/testing/selftests/ublk/file_backed.c | 104 +++
tools
Add file backed ublk target code, meantime add one fio test for
covering write verify, another test for mkfs/mount/umount.
Signed-off-by: Ming Lei
---
tools/testing/selftests/ublk/Makefile| 4 +-
tools/testing/selftests/ublk/file_backed.c | 158 +++
tools/testing
Both ublk driver and userspace heavily depends on io_uring subsystem,
and tools/testing/selftests/ should be the best place for holding this
cross-subsystem tests.
Add basic read/write IO test over this ublk null disk, and make sure ublk
working.
More tests will be added.
Signed-off-by: Ming
zero copy with io_link can pass
- dump log in case of error
- add one more test for mkfs/mount on zero copy
Ming Lei (3):
selftests: ublk: add kernel selftests for ublk
selftests: ublk: add file backed ublk
selftests: ublk: add ublk zero copy test
MAINTAINERS
On Wed, Feb 26, 2025 at 10:41:43AM -0700, Keith Busch wrote:
> On Wed, Feb 26, 2025 at 11:58:38PM +0800, Ming Lei wrote:
> > + struct io_uring_sqe *reg;
> > + struct io_uring_sqe *rw;
> > + struct io_uring_sqe *ureg;
> > +
> > + if (!zc) {
> >
- make -C tools/testing/selftests TARGETS=ublk run_test
Thanks,
V2:
- fix one sqe allocation bug, so ublk zero copy with io_link can pass
- dump log in case of error
- add one more test for mkfs/mount on zero copy
Ming Lei (3):
selftests: ublk: add kernel
Add selftests for covering ublk zero copy feature.
Signed-off-by: Ming Lei
---
tools/testing/selftests/ublk/Makefile| 2 +
tools/testing/selftests/ublk/kublk.c | 196 ---
tools/testing/selftests/ublk/test_common.sh | 8 +
tools/testing/selftests/ublk
Both ublk driver and userspace heavily depends on io_uring subsystem,
and tools/testing/selftests/ should be the best place for holding this
cross-subsystem tests.
Add basic read/write IO test over this ublk null disk, and make sure ublk
working.
More tests will be added.
Signed-off-by: Ming
Add file backed ublk and IO verify test.
Signed-off-by: Ming Lei
---
tools/testing/selftests/ublk/Makefile| 2 +
tools/testing/selftests/ublk/kublk.c | 172 ++-
tools/testing/selftests/ublk/test_common.sh | 47 +
tools/testing/selftests/ublk/test_loop_01
Both ublk driver and userspace heavily depends on io_uring subsystem,
and tools/testing/selftests/ should be the best place for holding this
cross-subsystem tests.
Add basic read/write IO test over this ublk null disk, and make sure ublk
working.
More tests will be added.
Signed-off-by: Ming
Add selftests for covering ublk zero copy feature.
Signed-off-by: Ming Lei
---
tools/testing/selftests/ublk/Makefile| 1 +
tools/testing/selftests/ublk/kublk.c | 204 +--
tools/testing/selftests/ublk/test_common.sh | 8 +
tools/testing/selftests/ublk
Add file backed ublk and IO verify test.
Signed-off-by: Ming Lei
---
tools/testing/selftests/ublk/Makefile| 2 +
tools/testing/selftests/ublk/kublk.c | 172 ++-
tools/testing/selftests/ublk/test_common.sh | 47 +
tools/testing/selftests/ublk/test_loop_01
/testing/selftests TARGETS=ublk run_test
Thanks,
Ming Lei (3):
selftests: ublk: add kernel selftests for ublk
selftests: ublk: add file backed ublk
selftests: ublk: add ublk zero copy test
MAINTAINERS |1 +
tools/testing/selftests/Makefile |1
On Fri, Jan 17, 2025 at 08:44:07AM +0100, Christoph Hellwig wrote:
> File systems can and often do allocate memory in the read-write path.
> If these allocations are done with __GFP_IO or __GFP_FS set they can
> recurse into the file system or swap device on top of the loop device
> and cause deadl
Hi Daniel,
On Fri, Jan 10, 2025 at 05:26:46PM +0100, Daniel Wagner wrote:
> When isolcpus=managed_irq is enabled, and the last housekeeping CPU for
> a given hardware context goes offline, there is no CPU left which
> handles the IOs anymore. If isolated CPUs mapped to this hardware
> context are
On Fri, Jan 10, 2025 at 10:21:49AM +0100, Daniel Wagner wrote:
> Hi Ming,
>
> On Fri, Dec 20, 2024 at 04:54:21PM +0800, Ming Lei wrote:
> > On Thu, Dec 19, 2024 at 04:38:43PM +0100, Daniel Wagner wrote:
> >
> > > When isolcpus=managed_irq is enabled all hardware
On Tue, Dec 17, 2024 at 07:29:43PM +0100, Daniel Wagner wrote:
> When we offlining a hardware context which also serves isolcpus mapped
> to it, any IO issued by the isolcpus will stall as there is nothing
> which handles the interrupts etc.
>
> This configuration/setup is not supported at this po
On Thu, Dec 19, 2024 at 05:20:44PM +0800, Ming Lei wrote:
> > > + cpumask_andnot(isol_mask,
> > > +cpu_possible_mask,
> > > +housekeeping_cpumask(HK_TYPE_MANAGED_IRQ));
> > > +
> > > + for_each_cpu(cpu, iso
On Tue, Dec 17, 2024 at 07:29:42PM +0100, Daniel Wagner wrote:
> When isolcpus=managed_irq is enabled all hardware queues should run on
> the housekeeping CPUs only. Thus ignore the affinity mask provided by
> the driver. Also we can't use blk_mq_map_queues because it will map all
> CPUs to first h
On Fri, Nov 15, 2024 at 05:37:52PM +0100, Daniel Wagner wrote:
> There are no users left of the pci and virtio queue mapping helpers.
> Thus remove them.
>
> Reviewed-by: Christoph Hellwig
> Reviewed-by: Hannes Reinecke
> Signed-off-by: Daniel Wagner
Reviewed-by: Ming Lei
--
Ming
ecke
> Signed-off-by: Daniel Wagner
Reviewed-by: Ming Lei
--
Ming
e
> Signed-off-by: Daniel Wagner
Reviewed-by: Ming Lei
--
Ming
t; retrieved. Also, those functions are located in the block subsystem
> where it doesn't really fit in. They are virtio and pci subsystem
> specific.
>
> Thus introduce provide a generic mapping function which uses the
> irq_get_affinity callback from bus_type.
>
> Originall
e
> Signed-off-by: Daniel Wagner
Reviewed-by: Ming Lei
--
Ming
On Thu, Nov 14, 2024 at 08:54:46AM +0100, Daniel Wagner wrote:
> On Thu, Nov 14, 2024 at 09:58:25AM +0800, Ming Lei wrote:
> > > +void blk_mq_hctx_map_queues(struct blk_mq_queue_map *qmap,
> >
> > Some drivers may not know hctx at all, maybe blk_mq_map_hw_queues()?
>
t; retrieved. Also, those functions are located in the block subsystem
> where it doesn't really fit in. They are virtio and pci subsystem
> specific.
>
> Thus introduce provide a generic mapping function which uses the
> irq_get_affinity callback from bus_type.
>
> Original
-by: Daniel Wagner
Reviewed-by: Ming Lei
--
Ming
Reinecke
> Signed-off-by: Daniel Wagner
Reviewed-by: Ming Lei
--
Ming
e_group **groups;
> const struct attribute_group **dev_groups;
The patch looks fine, but if you put 1, 2 and 5 into single patch,
it will become much easier to review, anyway:
Reviewed-by: Ming Lei
--
Ming
dev,
> + unsigned int irq_vec);
>
> int (*online)(struct device *dev);
> int (*offline)(struct device *dev);
>
Looks one nice abstraction,
Reviewed-by: Ming Lei
--
Ming
to previous behavior by keeping queue
quiesced during suspend.
Cc: Yi Sun
Cc: Michael S. Tsirkin
Cc: Jason Wang
Cc: Stefan Hajnoczi
Cc: virtualizat...@lists.linux.dev
Reported-by: Marek Szyprowski
Signed-off-by: Ming Lei
---
drivers/block/virtio_blk.c | 7 +--
1 file changed, 5 insert
On Thu, Oct 31, 2024 at 6:35 PM Thomas Gleixner wrote:
>
> On Thu, Oct 31 2024 at 15:46, guan...@linux.alibaba.com wrote:
> > #ifdef CONFIG_SMP
> >
> > +static unsigned int __read_mostly managed_irqs_per_node;
> > +static struct cpumask managed_irqs_cpumsk[MAX_NUMNODES]
> > __cacheline_aligned_i
On Tue, Aug 06, 2024 at 02:06:47PM +0200, Daniel Wagner wrote:
> When isolcpus=io_queue is enabled all hardware queues should run on the
> housekeeping CPUs only. Thus ignore the affinity mask provided by the
> driver. Also we can't use blk_mq_map_queues because it will map all CPUs
> to first hctx
On Tue, Aug 06, 2024 at 02:06:47PM +0200, Daniel Wagner wrote:
> When isolcpus=io_queue is enabled all hardware queues should run on the
> housekeeping CPUs only. Thus ignore the affinity mask provided by the
> driver. Also we can't use blk_mq_map_queues because it will map all CPUs
> to first hctx
On Fri, Aug 09, 2024 at 09:22:11AM +0200, Daniel Wagner wrote:
> On Thu, Aug 08, 2024 at 01:26:41PM GMT, Ming Lei wrote:
> > Isolated CPUs are removed from queue mapping in this patchset, when someone
> > submit IOs from the isolated CPU, what is the correct hctx used for handlin
On Wed, Aug 07, 2024 at 02:40:11PM +0200, Daniel Wagner wrote:
> On Tue, Aug 06, 2024 at 10:55:09PM GMT, Ming Lei wrote:
> > On Tue, Aug 06, 2024 at 02:06:47PM +0200, Daniel Wagner wrote:
> > > When isolcpus=io_queue is enabled all hardware queues should run on the
> >
On Tue, Aug 06, 2024 at 02:06:47PM +0200, Daniel Wagner wrote:
> When isolcpus=io_queue is enabled all hardware queues should run on the
> housekeeping CPUs only. Thus ignore the affinity mask provided by the
> driver. Also we can't use blk_mq_map_queues because it will map all CPUs
> to first hctx
On Tue, Aug 06, 2024 at 02:06:46PM +0200, Daniel Wagner wrote:
> group_cpus_evenly distributes all present CPUs into groups. This ignores
> the isolcpus configuration and assigns isolated CPUs into the groups.
>
> Make group_cpus_evenly aware of isolcpus configuration and use the
> housekeeping CP
On Sat, Feb 17, 2024 at 08:08:48PM +0200, Parav Pandit wrote:
> When the PCI device is surprise removed, requests won't complete from
> the device. These IOs are never completed and disk deletion hangs
> indefinitely.
>
> Fix it by aborting the IOs which the device will never complete
> when the V
1 - 100 of 3367 matches
Mail list logo