Message ID | 20230330213134.131298-1-kch@nvidia.com (mailing list archive) |
---|---|
Headers | show |
Series | null_blk: add modparam checks | expand |
Please take Damien's advice from v1 and compact these patches. This is getting somewhat out of hand and silly, imho. Are we gaming patch counts?! If not, what's the point?
On 3/30/2023 4:02 PM, Jens Axboe wrote: > Please take Damien's advice from v1 and compact these patches. This is > getting somewhat out of hand and silly, imho. Are we gaming patch > counts?! If not, what's the point? > okay, but it's not true with the patch-count here is how I got here :- Last year I started testing poll queues for null_blk and found an OOPs [1]. Then I fixed an OOPs with adding single parameter check, curiously I also looked around other parameters such as bs, submit_queues, gb, max_sector, queue_depth to see if I can add similar fix. As I moved forward with testing with each parameter I wrote a testcase and then wrote a patch for specific parameter because for poll_queue it was fixing OOPs and now it is a warn message [2] that's why I still think is a fix. So how can I mix poll_queue fix with other code which has nothing to do with the fix ? since a fix needs to be isolated and not mixed up with new functionality I kept everything isolated into their own patches, also keeping check isolated allows us to print the right error message instead of just -EINVAL with reference to V2. Clearly that is not how things to be done, as per your suggestion I'll make a single patch for all the checks. I should have sent a fix alone then do the fixing for rest params later 2-3 patches that's my mistake. I truly believe that testing and finding bugs adds more value than increasing patch count, that is how I found an OOPs in my testing and wrote a testcase(s) for that, it is in commit log. Amount of testing I've done for this is really not worth a patch count but definitely worth a blktests :). On the similar note I'll also trim the brd series. -ck [1] Entering kdb (current=0xffff88817eaed100, pid 5624) on processor 12 Oops: (null) due to oops @ 0xffffffff8165093f CPU: 12 PID: 5624 Comm: modprobe Tainted: G OE 6.0.0-rc7blk+ #53 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 RIP: 0010:blk_mq_alloc_tag_set+0x14f/0x380 Code: 83 c5 01 3b 6b 40 0f 83 9a 01 00 00 48 8b 43 68 4c 63 e5 4e 8d 34 e0 f6 43 58 08 75 d7 8b 53 44 89 ee 48 89 df e8 d1 ed ff ff <49> 89 06 48 8b 43 68 4a 83 3c e0 00 75 c3 83 ed 01 78 0f 89 ee 48 RSP: 0018:ffffc90002eefd70 EFLAGS: 00010282 RAX: ffff888112b155c0 RBX: ffff88811069dc38 RCX: 0000000000000003 RDX: ffff88811069d000 RSI: ffff88810ed60000 RDI: 00000000000001f8 RBP: 0000000000000000 R08: 0000000000000003 R09: ffff888112b15650 R10: 000000000010ed60 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000040 R14: 0000000000000000 R15: 0000000000000000 FS: 00007f71e4147b80(0000) GS:ffff888fff500000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 000000014d81c000 CR4: 0000000000350ee0 Call Trace: <TASK> null_add_dev+0x7a7/0x870 [null_blk] null_init+0x1de/0x1000 [null_blk] ? 0xffffffffc03a9000 do_one_initcall+0x44/0x210 ? kmem_cache_alloc_trace+0x15b/0x2b0 do_init_module+0x4c/0x1f0 __do_sys_finit_module+0xb4/0x130 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f71e426e15d Code: c5 0c 00 0f 05 eb a9 66 0f 1f 44 00 00 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 e3 7c 0c 00 f7 d8 64 89 01 48 RSP: 002b:00007fffb29f27a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 RAX: ffffffffffffffda RBX: 0000564b29d78b90 RCX: 00007f71e426e15d RDX: 0000000000000000 RSI: 0000564b29d78f00 RDI: 0000000000000003 RBP: 0000000000040000 R08: 0000000000000000 R09: 0000000000000020 R10: 0000000000000003 R11: 0000000000000246 R12: 0000564b29d78f00 R13: 0000564b29d78cc0 R14: 0000564b29d78b90 R15: 0000564b29d78f20 </TASK> [2] modprobe null_blk poll_queues=64 [29808.758787] ------------[ cut here ]------------ [29808.758790] WARNING: CPU: 27 PID: 41164 at lib/group_cpus.c:400 group_cpus_evenly+0x26e/0x280 [29808.758798] Modules linked in: null_blk(O+) xt_state xt_conntrack nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 uinput nvme(O) nvme_core(O) nvme_common snd_seq_dummy snd_hrtimer snd_seq snd_seq_device snd_timer snd soundcore ip6table_mangle ip6table_raw ip6table_security iptable_mangle iptable_raw iptable_security ip_set nf_tables rfkill nfnetlink ip6table_filter ip6_tables iptable_filter tun sunrpc intel_rapl_msr intel_rapl_common xfs kvm_amd ppdev ccp kvm parport_pc parport irqbypass pcspkr joydev i2c_piix4 zram ip_tables bochs drm_vram_helper crct10dif_pclmul crc32_pclmul drm_kms_helper crc32c_intel drm_ttm_helper ghash_clmulni_intel ttm sha512_ssse3 virtio_net net_failover serio_raw virtio_blk drm failover ata_generic pata_acpi qemu_fw_cfg fuse [last unloaded: null_blk(O)] [29808.758850] CPU: 27 PID: 41164 Comm: modprobe Tainted: G W O N 6.3.0-rc1lblk+ #2 [29808.758853] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 [29808.758855] RIP: 0010:group_cpus_evenly+0x26e/0x280 [29808.758858] Code: b1 ff 48 8b 7c 24 08 e8 20 d1 5d 00 48 8b 3c 24 e8 17 d1 5d 00 45 85 ed 0f 89 01 fe ff ff e9 f1 fd ff ff e8 b4 9d 8d ff eb ac <0f> 0b eb a8 e8 39 c4 60 00 41 bd f4 ff ff ff eb 9b cc 90 90 90 90 [29808.758860] RSP: 0018:ffffc90000f4bcb8 EFLAGS: 00010287 [29808.758862] RAX: 0000000080000000 RBX: 0000000000000040 RCX: 0000000000000000 [29808.758864] RDX: 0000000000000001 RSI: 0000000000000030 RDI: 00000000ffffffff [29808.758865] RBP: ffff8888535b2668 R08: ffff8888535b2150 R09: ffff8888c3fa0000 [29808.758866] R10: ffff8888535b2150 R11: 0000000000000000 R12: ffff8888c3fa0000 [29808.758868] R13: 0000000000000000 R14: 0000000000000030 R15: 0000000000000000 [29808.758871] FS: 00007f00bda3eb80(0000) GS:ffff888fff8c0000(0000) knlGS:0000000000000000 [29808.758873] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [29808.758875] CR2: 00007f00bd506800 CR3: 00000008330cc000 CR4: 0000000000350ee0 [29808.758878] DR0: ffffffff843793e1 DR1: ffffffff843793e2 DR2: ffffffff843793e3 [29808.758879] DR3: ffffffff8437944f DR6: 00000000ffff0ff0 DR7: 0000000000000600 [29808.758880] Call Trace: [29808.758883] <TASK> [29808.758888] blk_mq_map_queues+0x16/0xc0 [29808.758893] null_map_queues+0xa5/0xe0 [null_blk] [29808.758903] blk_mq_alloc_tag_set+0x14d/0x3f0 [29808.758907] ? __kmalloc+0xbc/0x130 [29808.758911] null_add_dev.part.0+0x601/0x700 [null_blk] [29808.758920] null_init+0x109/0xff0 [null_blk] [29808.758929] ? __pfx_init_module+0x10/0x10 [null_blk] [29808.758937] do_one_initcall+0x44/0x220 [29808.758942] ? kmalloc_trace+0x25/0x90 [29808.758945] do_init_module+0x4c/0x210 [29808.758949] __do_sys_finit_module+0xb4/0x130 [29808.758955] do_syscall_64+0x3b/0x90 [29808.758959] entry_SYSCALL_64_after_hwframe+0x72/0xdc [29808.758963] RIP: 0033:0x7f00bd52c15d [29808.758965] Code: c5 0c 00 0f 05 eb a9 66 0f 1f 44 00 00 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 e3 7c 0c 00 f7 d8 64 89 01 48 [29808.758967] RSP: 002b:00007ffdc8b239b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [29808.758969] RAX: ffffffffffffffda RBX: 0000559f27d02b90 RCX: 00007f00bd52c15d [29808.758970] RDX: 0000000000000000 RSI: 0000559f27d02f00 RDI: 0000000000000003 [29808.758971] RBP: 0000000000040000 R08: 0000000000000000 R09: 0000000000000020 [29808.758972] R10: 0000000000000003 R11: 0000000000000246 R12: 0000559f27d02f00 [29808.758973] R13: 0000559f27d02cc0 R14: 0000559f27d02b90 R15: 0000559f27d02f20 [29808.758976] </TASK> [29808.758977] ---[ end trace 0000000000000000 ]---