Re: [PATCH] block: Do not merge if merging is disabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/7/23 10:50, Bart Van Assche wrote:
> On 7/6/23 17:38, Ming Lei wrote:
>> Given blk_mq_sched_try_insert_merge is only called from bfq and
>> deadline, it may not matter to apply this optimization.
> 
> Without this patch, the documentation of the "nomerges" sysfs
> attribute is incorrect. I need this patch because I want the
> ability to disable merging even if an I/O scheduler has been
> selected. As mentioned in the patch description, I discovered
> this while I was writing a shell script that submits various
> I/O workloads to a block device.

Ming's point still stands I think: blk_queue_nomerges(q) is the first
thing checked in elv_attempt_insert_merge(). So your patch should be a
no-op and disabling merging through sysfs should still be effective. Why
is your patch changing anything ?

Moving blk_mq_sched_try_insert_merge() call to rq_mergeable(rq) inside
elv_attempt_insert_merge() would also make a lot of sense I think. With
that, blk_mq_sched_try_insert_merge() would be reduced to calling only
elv_attempt_insert_merge(), which means that elv_attempt_insert_merge()
could go away.

-- 
Damien Le Moal
Western Digital Research




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux