android_kernel_motorola_sm6225/init
Johannes Weiner 3dc54b0444 psi: make disabling/enabling easier for vendor kernels
Mel Gorman reports a hackbench regression with psi that would prohibit
shipping the suse kernel with it default-enabled, but he'd still like
users to be able to opt in at little to no cost to others.

With the current combination of CONFIG_PSI and the psi_disabled bool set
from the commandline, this is a challenge.  Do the following things to
make it easier:

1. Add a config option CONFIG_PSI_DEFAULT_DISABLED that allows distros
   to enable CONFIG_PSI in their kernel but leave the feature disabled
   unless a user requests it at boot-time.

   To avoid double negatives, rename psi_disabled= to psi=.

2. Make psi_disabled a static branch to eliminate any branch costs
   when the feature is disabled.

In terms of numbers before and after this patch, Mel says:

: The following is a comparision using CONFIG_PSI=n as a baseline against
: your patch and a vanilla kernel
:
:                          4.20.0-rc4             4.20.0-rc4             4.20.0-rc4
:                 kconfigdisable-v1r1                vanilla        psidisable-v1r1
: Amean     1       1.3100 (   0.00%)      1.3923 (  -6.28%)      1.3427 (  -2.49%)
: Amean     3       3.8860 (   0.00%)      4.1230 *  -6.10%*      3.8860 (  -0.00%)
: Amean     5       6.8847 (   0.00%)      8.0390 * -16.77%*      6.7727 (   1.63%)
: Amean     7       9.9310 (   0.00%)     10.8367 *  -9.12%*      9.9910 (  -0.60%)
: Amean     12     16.6577 (   0.00%)     18.2363 *  -9.48%*     17.1083 (  -2.71%)
: Amean     18     26.5133 (   0.00%)     27.8833 *  -5.17%*     25.7663 (   2.82%)
: Amean     24     34.3003 (   0.00%)     34.6830 (  -1.12%)     32.0450 (   6.58%)
: Amean     30     40.0063 (   0.00%)     40.5800 (  -1.43%)     41.5087 (  -3.76%)
: Amean     32     40.1407 (   0.00%)     41.2273 (  -2.71%)     39.9417 (   0.50%)
:
: It's showing that the vanilla kernel takes a hit (as the bisection
: indicated it would) and that disabling PSI by default is reasonably
: close in terms of performance for this particular workload on this
: particular machine so;

Link: http://lkml.kernel.org/r/20181127165329.GA29728@cmpxchg.org
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Tested-by: Mel Gorman <mgorman@techsingularity.net>
Reported-by: Mel Gorman <mgorman@techsingularity.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Change-Id: Idbf6ec163adcea17e8697b963e0ca2fe93cf2501
Git-commit: e0c274472d5d27f277af722e017525e0b33784cd
Git-repo: https://source.codeaurora.org/quic/la/kernel/msm-4.19
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2019-03-08 19:33:21 -08:00
..
calibrate.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
do_mounts.c CHROMIUM: dm: boot time specification of dm= 2018-08-28 16:46:04 +05:30
do_mounts.h CHROMIUM: dm: boot time specification of dm= 2018-08-28 16:46:04 +05:30
do_mounts_dm.c ANDROID: dm: do_mounts_dm: Update init/do_mounts_dm.c to the latest ChromiumOS version. 2018-08-28 16:46:04 +05:30
do_mounts_initrd.c init/: remove ineffective sparse disabling 2018-08-22 10:52:49 -07:00
do_mounts_md.c init/: remove ineffective sparse disabling 2018-08-22 10:52:49 -07:00
do_mounts_rd.c init/: remove ineffective sparse disabling 2018-08-22 10:52:49 -07:00
init_task.c signal: Don't restart fork when signals come in. 2018-08-09 13:07:01 -05:00
initramfs.c Merge android-4.19.10 (67319b7) into msm-4.19 2019-01-07 00:39:15 -08:00
Kconfig psi: make disabling/enabling easier for vendor kernels 2019-03-08 19:33:21 -08:00
main.c init/main.c: log init process file name 2018-08-22 10:52:49 -07:00
Makefile ANDROID: initramfs: Add skip_initramfs command line option 2018-08-28 17:10:42 +05:30
noinitramfs.c ANDROID: initramfs: Add skip_initramfs command line option 2018-08-28 17:10:42 +05:30
version.c kbuild: Add build salt to the kernel and modules 2018-07-18 01:18:05 +09:00