On Mon, May 10, 2021 at 11:58:32PM -0700, Song Liu wrote:
IIUC, the sysfs node is needed to get better performance (by disabling
accounting)?
FYI, we already have that sysfs file in the block layer
("queue/iostats"), please just observe QUEUE_FLAG_IO_STAT flag.
in md.c). This
should simplify the code. If the user do not need extreme performance, we should
keep the stats on (default). If the user do need extreme performance, s/he could
disable stats via sysfs.
Given that the code already does a memory allocation it might as well
always clone and do away with the separate md_io allocation entirely.
Memory usage grows a bit, but it can reuse all the bio cloning
infrastructure.