linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Ming Lei <ming.lei@redhat.com>
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 v2 2/3] loop: Select I/O scheduler 'none' from inside add_disk()
Date: Thu, 5 Aug 2021 09:49:00 -0700	[thread overview]
Message-ID: <ed738693-0a08-8047-7300-e84b4e3b6cd5@acm.org> (raw)
In-Reply-To: <YQtaWz7EtkNAtIkY@T590>

On 8/4/21 8:26 PM, Ming Lei wrote:
> On Wed, Aug 04, 2021 at 10:43:05AM -0700, Bart Van Assche wrote:
>> Thanks for having suggested an alternative. However, isn't the above a
>> policy? Shouldn't a kernel provide mechanisms instead of policies?
> 
> REQ_SWAP means it is one IO written to swap device/file, so the system
> is suffering memory pressure, then isn't it reasonable to bypass io
> scheduler for all SWAP IOs?

Hmm ... I'm not sure that approach is ideal when swapping to a hard disk.

>> Additionally, the above patch does not address all Android loop driver use
>> cases. Reading APEX files is regular I/O and hence REQ_SWAP is not set while
>> reading from APEX files.
> 
> Is APEX file one swap file? If not, can you explain it a bit why you want to
> switch to none when reading APEX file?

As far as I know Android uses the loop driver for two purposes:
- A zram instance is used as swap device and the zram instance is
   configured to use a loop device.
- apexd mounts APEX files read-only and uses the loop driver to access
   these files as a block device.

Bart.

  reply	other threads:[~2021-08-05 16:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-03 18:23 [PATCH v2 0/3] Improve loop driver I/O scheduler and QD selection Bart Van Assche
2021-08-03 18:23 ` [PATCH v2 1/3] blk-mq: Introduce the BLK_MQ_F_NO_SCHED_BY_DEFAULT flag Bart Van Assche
2021-08-03 18:23 ` [PATCH v2 2/3] loop: Select I/O scheduler 'none' from inside add_disk() Bart Van Assche
2021-08-04  2:39   ` Ming Lei
2021-08-04 17:43     ` Bart Van Assche
2021-08-05  3:26       ` Ming Lei
2021-08-05 16:49         ` Bart Van Assche [this message]
2021-08-04 17:58     ` Jens Axboe
2021-08-04  5:35   ` Christoph Hellwig
2021-08-04 17:58     ` Bart Van Assche
2021-08-04 18:04       ` Jens Axboe
2021-08-05  6:39       ` Christoph Hellwig
2021-08-03 18:23 ` [PATCH v2 3/3] loop: Add the default_queue_depth kernel module parameter Bart Van Assche
2021-08-04  6:07   ` Greg KH
2021-08-04 17:38     ` Bart Van Assche
2021-08-04 19:33       ` Greg KH
2021-08-05  6:14     ` Chaitanya Kulkarni

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=ed738693-0a08-8047-7300-e84b4e3b6cd5@acm.org \
    --to=bvanassche@acm.org \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=jaegeuk@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=maco@android.com \
    --cc=ming.lei@redhat.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;
as well as URLs for NNTP newsgroup(s).