I've been looking and looking and everybody explains the /proc/diskstats file, but nobody seems to explain where that data comes from.
I found this comment:
Just remember that /proc/diskstats is tracking the kernel’s read requests–not yours.
on this page:
https://kevinclosson.net/2018/10/09/no-proc-diskstats-does-not-track-your-physical-i-o-requests/
But basically my problem is that I've got a kernel module that creates a block device, and handles requests via a request handler set via blk_queue_make_request not blk_init_queue, just like dm, I don't want the kernel to queue requests for me.
Everything works fine, but nothing shows up in /proc/diskstats What bit of magic am I missing to get my stats in there so it will show up in iostat? I assumed the kernel would be tallying this information since it's handling the requests to the kernel module, but apparently not. or I'm missing a flag somewhere or something.
Any ideas?