android_kernel_motorola_sm6375/drivers/block
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Bart Van Assche be4d2b4562 loop: Select I/O scheduler 'none' from inside add_disk()
commit 2112f5c1330a671fa852051d85cb9eadc05d7eb7 upstream.

We noticed that the user interface of Android devices becomes very slow
under memory pressure. This is because Android uses the zram driver on top
of the loop driver for swapping, because under memory pressure the swap
code alternates reads and writes quickly, because mq-deadline is the
default scheduler for loop devices and because mq-deadline delays writes by
five seconds for such a workload with default settings. Fix this by making
the kernel select I/O scheduler 'none' from inside add_disk() for loop
devices. This default can be overridden at any time from user space,
e.g. via a udev rule. This approach has an advantage compared to changing
the I/O scheduler from userspace from 'mq-deadline' into 'none', namely
that synchronize_rcu() does not get called.

This patch changes the default I/O scheduler for loop devices from
'mq-deadline' into 'none'.

Additionally, this patch reduces the Android boot time on my test setup
with 0.5 seconds compared to configuring the loop I/O scheduler from user
space.

Cc: Christoph Hellwig <hch@lst.de>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Martijn Coenen <maco@android.com>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20210805174200.3250718-3-bvanassche@acm.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-11 11:53:54 +02:00
..
aoe
drbd treewide: Remove uninitialized_var() usage 2023-06-09 10:29:01 +02:00
mtip32xx
paride
rsxx
xen-blkback
zram zram: off by one in read_block_state() 2021-11-17 09:48:47 +01:00
amiflop.c
ataflop.c block: ataflop: fix breakage introduced at blk-mq refactoring 2021-11-17 09:48:38 +01:00
brd.c
cryptoloop.c cryptoloop: add a deprecation warning 2021-09-12 08:56:40 +02:00
floppy.c floppy: use a statically allocated error counter 2022-05-25 09:14:31 +02:00
Kconfig floppy: disable FDRAWCMD by default 2022-05-09 09:03:20 +02:00
loop.c loop: Select I/O scheduler 'none' from inside add_disk() 2023-08-11 11:53:54 +02:00
loop.h
Makefile
nbd.c nbd: Add the maximum limit of allocated index in nbd_dev_add 2023-07-27 08:37:41 +02:00
null_blk.h
null_blk_main.c null_blk: fix ida error handling in null_add_dev() 2022-08-25 11:17:59 +02:00
null_blk_zoned.c
pktcdvd.c
ps3disk.c
ps3vram.c
rbd.c rbd: get snapshot context after exclusive lock is ensured to be held 2023-06-14 10:59:59 +02:00
rbd_types.h
skd_main.c
skd_s1120.h
sunvdc.c block: sunvdc: add check for mdesc_grab() returning NULL 2023-03-22 13:28:06 +01:00
swim.c
swim3.c
swim_asm.S
sx8.c
umem.c
umem.h
virtio_blk.c virtio_blk: fix the discard_granularity and discard_alignment queue limits 2022-06-14 18:11:35 +02:00
xen-blkfront.c xen/blkfront: Only check REQ_FUA for writes 2023-06-21 15:44:09 +02:00
xsysace.c
z2ram.c