Hello Paolo,
If I run the following commands:
# echo bfq > /sys/block/sda/queue/scheduler
# echo 3 >/proc/sys/vm/drop_caches; find / -xdev >/dev/null
# echo none > /sys/block/sda/queue/scheduler
# echo scan > /sys/kernel/debug/kmemleak
Then kmemleak reports the following:
unreferenced object 0xffff880405149158 (size 4096):
comm "bash", pid 1716, jiffies 4294960386 (age 75256.970s)
hex dump (first 32 bytes):
48 a5 f4 a3 04 88 ff ff 01 00 00 00 00 00 00 00 H...............
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff8165a50a>] kmemleak_alloc+0x4a/0xa0
[<ffffffff811f5114>] kmem_cache_alloc_node_trace+0x154/0x310
[<ffffffffa07087bc>] bfq_pd_alloc+0x3c/0x3f0 [bfq]
[<ffffffff8130e4bc>] blkcg_activate_policy+0xac/0x170
[<ffffffffa0709b4c>] bfq_create_group_hierarchy+0x1c/0x66 [bfq]
[<ffffffffa070277b>] bfq_init_queue+0x28b/0x350 [bfq]
[<ffffffff8130223b>] blk_mq_init_sched+0xbb/0x150
[<ffffffff812e6b42>] elevator_switch+0x62/0x210
[<ffffffff812e7ca2>] elv_iosched_store+0xe2/0x180
[<ffffffff812f23a9>] queue_attr_store+0x59/0x90
[<ffffffff812ac715>] sysfs_kf_write+0x45/0x60
[<ffffffff812abfd4>] kernfs_fop_write+0x124/0x1c0
[<ffffffff8121d218>] __vfs_write+0x28/0x150
[<ffffffff8121e7e7>] vfs_write+0xc7/0x1b0
[<ffffffff8121fd69>] SyS_write+0x49/0xa0
[<ffffffff81667c2a>] entry_SYSCALL_64_fastpath+0x18/0xad
Could this indicate a memory leak in the BFQ code?
Thanks,
Bart.