Linux 6.11 Device Mapper Will Optimize Flushing
The latest performance optimization work for the Linux kernel's Device Mapper (DM) comes thanks to Red Hat's Mikulas Patocka.
A patch queued within the Device Mapper's Git tree ahead of the Linux 6.11 merge window in mid-July is for optimizing flushing. Mikulas Patocka discovered currently inefficient handling of flushing that could lead to multiple unnecessary and redundant flushes to the underlying storage device. Patocka explained in the patch:
This efficiency optimization is queued up in the DM code ahead of the Linux 6.11 cycle.
A patch queued within the Device Mapper's Git tree ahead of the Linux 6.11 merge window in mid-July is for optimizing flushing. Mikulas Patocka discovered currently inefficient handling of flushing that could lead to multiple unnecessary and redundant flushes to the underlying storage device. Patocka explained in the patch:
"Device mapper sends flush bios to all the targets and the targets send it to the underlying device. That may be inefficient, for example if a table contains 10 linear targets pointing to the same physical device, then device mapper would send 10 flush bios to that device - despite the fact that only one bio would be sufficient.
This commit optimizes the flush behavior. It introduces a per-target variable flush_bypasses_map - it is set when the target supports flush optimization - currently, the dm-linear and dm-stripe targets support it. When all the targets in a table have flush_bypasses_map, flush_bypasses_map on the table is set. __send_empty_flush tests if the table has flush_bypasses_map - and if it has, no flush bios are sent to the targets via the "map" method and the list dm_table->devices is iterated and the flush bios are sent to each member of the list."
This efficiency optimization is queued up in the DM code ahead of the Linux 6.11 cycle.
6 Comments