On 8/13/25 8:57 AM, Bart Van Assche wrote: > On 8/11/25 7:12 PM, Damien Le Moal wrote: >> On 8/12/25 5:08 AM, Bart Van Assche wrote: >>> Some storage controllers preserve the request order per hardware queue. >>> Some but not all device mapper drivers preserve the bio order. Introduce >>> the feature flag BLK_FEAT_ORDERED_HWQ to allow block drivers and stacked >>> drivers to indicate that the order of write commands is preserved per >>> hardware queue and hence that serialization of writes per zone is not >>> required if all pending writes are submitted to the same hardware queue. >>> Add a sysfs attribute for controlling write pipelining support. >> >> Why ? Why would you want to disable write pipelining since it give better >> performance ? >> >> The commit message also does not describe BLK_FEAT_PIPELINE_ZWR, but I think >> this enable/disable flag is not needed. > > Hi Damien, > > Having a control in sysfs for enabling and disabling write pipelining is > very convenient when measuring the performance impact of write > pipelining. Adding such a control in each block driver would be > cumbersome because it would require to add the following sequence in > every block driver: > * Freeze the request queue. > * Call queue_limits_start_update(). > * Toggle the BLK_FEAT_ORDERED_HWQ flag. > * Call queue_limits_commit_update_frozen(). > * Unfreeze the request queue. > > Do you agree that this the "pipeline_zoned_writes" sysfs attribute is > useful? If not, I will drop the newly introduced sysfs attribute and also the > BLK_FEAT_PIPELINE_ZWR flag. I do not think it is useful. All one needs to do to compare with & without is to comment out one line in the driver that sets BLK_FEAT_ORDERED_HWQ. Sure that needs a kernel recompile, but it is for debugging/evaluation, right ? So I would not clutter the code with that feature. -- Damien Le Moal Western Digital Research