public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
	Jaegeuk Kim <jaegeuk@kernel.org>,
	Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
	Martijn Coenen <maco@android.com>
Subject: Re: [PATCH 1/2] loop: Prevent that an I/O scheduler is assigned
Date: Tue, 3 Aug 2021 15:18:03 +0800	[thread overview]
Message-ID: <YQjtq/QVhZX9jsQU@T590> (raw)
In-Reply-To: <07388685-bb67-3fc9-83e2-32a4a37fec4d@acm.org>

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


  reply	other threads:[~2021-08-03  7:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-03  0:01 [PATCH 0/2] Two loop driver patches Bart Van Assche
2021-08-03  0:01 ` [PATCH 1/2] loop: Prevent that an I/O scheduler is assigned Bart Van Assche
2021-08-03  1:54   ` Ming Lei
2021-08-03  5:23     ` Bart Van Assche
2021-08-03  7:18       ` Ming Lei [this message]
2021-08-03  0:02 ` [PATCH 2/2] loop: Add the default_queue_depth kernel module parameter Bart Van Assche
2021-08-03  1:57   ` Ming Lei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YQjtq/QVhZX9jsQU@T590 \
    --to=ming.lei@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=hch@lst.de \
    --cc=jaegeuk@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=maco@android.com \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox