Re: [PATCH 1/2] loop: Prevent that an I/O scheduler is assigned

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

 



On Mon, Aug 02, 2021 at 10:23:56PM -0700, Bart Van Assche wrote:
> On 8/2/21 6:54 PM, Ming Lei wrote:
> > On Mon, Aug 02, 2021 at 05:01:59PM -0700, Bart Van Assche wrote:
> >> Loop devices have a single hardware queue. Hence, the block layer function
> >> elevator_get_default() selects the mq-deadline scheduler for loop devices.
> >> Using the mq-deadline scheduler or any other I/O scheduler for loop devices
> >> incurs unnecessary overhead. Make the loop driver pass the flag
> >> BLK_MQ_F_NOSCHED to the block layer core such that no I/O scheduler can be
> >> associated with block devices. This approach has an advantage compared to
> >> letting udevd change the loop I/O scheduler to none, namely that
> >> synchronize_rcu() does not get called.
> >>
> >> It is intentional that the flag BLK_MQ_F_SHOULD_MERGE is preserved.
> >>
> >> This patch reduces the Android boot time on my test setup with 0.5 seconds.
> > 
> > Can you investigate why none reduces Android boot time? Or reproduce &
> > understand it by a fio simulation on your setting?
> 
> Hi Ming,
> 
> The software process called apexd creates multiple loop devices while
> the device is booting. Using BLK_MQ_F_NO_SCHED is faster than letting
> apexd change the I/O scheduler from mq-deadline into 'none' since the
> latter involves calling synchronize_rcu() once per loop device.

OK, but why does apexd switch to none during booting? Does none perform
better than deadline during booting in the Android setting?


Thanks,
Ming




[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