All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Jens Axboe <axboe@kernel.dk>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: Re: [PATCH] null_blk: poll queue support
Date: Mon, 3 May 2021 08:47:01 -0700	[thread overview]
Message-ID: <725ea863-c754-addf-f143-71d7e2f273de@acm.org> (raw)
In-Reply-To: <baca710d-0f2a-16e2-60bd-b105b854e0ae@kernel.dk>

On 4/17/21 8:29 AM, Jens Axboe wrote:
> There's currently no way to experiment with polled IO with null_blk,
> which seems like an oversight. This patch adds support for polled IO.
> We keep a list of issued IOs on submit, and then process that list
> when mq_ops->poll() is invoked.
> 
> A new parameter is added, poll_queues. It defaults to 1 like the
> submit queues, meaning we'll have 1 poll queue available.

Has anyone run blktests against blk-for-next since this patch got
queued? The following appears in the kernel log if I run blktests:

root[5563]: run blktests block/010
null_blk: module loaded
==================================================================
BUG: KASAN: null-ptr-deref in null_map_queues+0x131/0x1a0 [null_blk]
Read of size 8 at addr 0000000000000000 by task modprobe/5612

CPU: 7 PID: 5612 Comm: modprobe Not tainted 5.12.0-dbg+ #33
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a-rebuilt.opensuse.org 04/01/2014
Call Trace:
 show_stack+0x52/0x58
 dump_stack+0x9d/0xcf
 kasan_report.cold+0x4b/0x50
 __asan_load8+0x69/0x90
 null_map_queues+0x131/0x1a0 [null_blk]
 blk_mq_update_queue_map+0x122/0x1a0
 blk_mq_alloc_tag_set+0x1c8/0x480
 null_init_tag_set+0x19c/0x220 [null_blk]
 null_init+0x1ac/0x1000 [null_blk]
 do_one_initcall+0xd3/0x460
 do_init_module+0x10a/0x400
 load_module+0xbe2/0xc50
 __do_sys_finit_module+0x131/0x1c0
 __x64_sys_finit_module+0x43/0x50
 do_syscall_64+0x3a/0xb0
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f51f7fd367d
Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d bb f7 0c 00 f7 d8 64 89 01 48
RSP: 002b:00007ffd4a668728 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
RAX: ffffffffffffffda RBX: 00005609718ddbe0 RCX: 00007f51f7fd367d
RDX: 0000000000000000 RSI: 00005609718ddfe0 RDI: 0000000000000003
RBP: 0000000000040000 R08: 0000000000000000 R09: 000000000000003a
R10: 0000000000000003 R11: 0000000000000246 R12: 00005609718ddfe0
R13: 0000000000000000 R14: 00005609718ddd70 R15: 00005609718ddbe0
==================================================================

Thanks,

Bart.

  parent reply	other threads:[~2021-05-03 15:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-17 15:29 [PATCH] null_blk: poll queue support Jens Axboe
2021-04-18  4:48 ` Chaitanya Kulkarni
2021-04-18  4:49 ` Chaitanya Kulkarni
2021-04-19 19:48   ` Jens Axboe
2021-04-19 22:19     ` Chaitanya Kulkarni
2021-04-19 22:55       ` Jens Axboe
2021-05-03 15:47 ` Bart Van Assche [this message]
2021-05-03 17:42   ` Jens Axboe
2021-05-04  0:32     ` Bart Van Assche
2021-09-14 21:38 ` Pavel Begunkov
2021-09-16  1:57   ` Jens Axboe
2021-09-20 11:40     ` Pavel Begunkov

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=725ea863-c754-addf-f143-71d7e2f273de@acm.org \
    --to=bvanassche@acm.org \
    --cc=axboe@kernel.dk \
    --cc=linux-block@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.