From 7f3fe0aaf286fa150878e7222593db2b38701ce1 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 11 Mar 2024 16:14:47 -0700 Subject: [PATCH] Make foreground and background I/O priority different The default I/O priority is "best effort" so the combination of "none" and "restrict-to-be" is not sufficient to make foreground and background I/O priorities different. This CL makes sure that foreground and background I/O priorities are different. As one can see, this CL has the intended effect in Cuttlefish: $ adb -s 0.0.0.0:6520 shell 'cd /dev/blkio && grep -aH . blkio.prio.class background/blkio.prio.class' blkio.prio.class:promote-to-rt background/blkio.prio.class:restrict-to-be Bug: 186902601 Change-Id: I24d30d360280d8c398684b0b5e88635f658ff870 Signed-off-by: Bart Van Assche --- rootdir/init.rc | 1 + 1 file changed, 1 insertion(+) diff --git a/rootdir/init.rc b/rootdir/init.rc index bf34a9e66..ec203f91b 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -247,6 +247,7 @@ on init write /dev/blkio/background/blkio.bfq.weight 10 write /dev/blkio/blkio.group_idle 0 write /dev/blkio/background/blkio.group_idle 0 + write /dev/blkio/blkio.prio.class promote-to-rt write /dev/blkio/background/blkio.prio.class restrict-to-be restorecon_recursive /mnt