From c3991a7150fee5ffd81016610eb5c306d457a216 Mon Sep 17 00:00:00 2001 From: Miao Wang Date: Fri, 7 Feb 2020 15:01:24 -0800 Subject: [PATCH] Add an stune group for NNAPI HAL - schedtune.prefer_idle 1 - schedtune.boost 1 Test: mm Test: configure NNAPI HAL to use nnapi-hal stune Test: measure perf difference using MLTS benchmark Change-Id: I5f467c6a58f2c1da40ec8276e101defc808854a3 (cherry picked from commit 1d748feaec5db7a35066f53f8e5edaf22520c02d) --- rootdir/init.rc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rootdir/init.rc b/rootdir/init.rc index 896745bec..9458e2314 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -144,6 +144,14 @@ on init chmod 0664 /dev/stune/top-app/tasks chmod 0664 /dev/stune/rt/tasks + # Create an stune group for NNAPI HAL processes + mkdir /dev/stune/nnapi-hal + chown system system /dev/stune/nnapi-hal + chown system system /dev/stune/nnapi-hal/tasks + chmod 0664 /dev/stune/nnapi-hal/tasks + write /dev/stune/nnapi-hal/schedtune.boost 1 + write /dev/stune/nnapi-hal/schedtune.prefer_idle 1 + # Create blkio group and apply initial settings. # This feature needs kernel to support it, and the # device's init.rc must actually set the correct values.