Files
kernel_xiaomi_raphael/include/linux
Johannes Weiner 978392049e UPSTREAM: 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>

(cherry picked from commit e0c274472d5d27f277af722e017525e0b33784cd)

Bug: 127712811
Test: lmkd in PSI mode
Change-Id: I6cb666fa351e8901df82e4d6931bfec0c5ce230d
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-03-21 16:19:56 -07:00
..
2018-08-03 08:56:38 +02:00
2018-05-25 17:23:22 +02:00
2018-10-04 16:14:47 -07:00
2018-04-24 09:36:39 +02:00
2018-11-08 07:43:01 -08:00
2017-07-03 16:56:28 -06:00
2018-02-22 15:42:23 +01:00
2019-03-21 16:19:55 -07:00
2019-03-21 16:19:55 -07:00
2017-08-30 14:40:40 +02:00
2019-03-13 14:18:51 -07:00
2018-09-26 08:42:37 +02:00
2018-05-30 13:17:17 +02:00
2017-08-24 13:23:03 -07:00
2018-02-22 15:42:23 +01:00
2017-07-17 13:42:48 +02:00
2017-08-07 17:22:14 +02:00
2018-02-22 15:42:23 +01:00
2018-12-01 09:50:46 +01:00
2018-04-12 09:41:49 -07:00
2018-06-21 04:02:49 +09:00
2017-06-21 14:37:12 -04:00
2018-02-22 15:42:24 +01:00
2017-08-15 18:23:52 +02:00
2018-01-04 13:50:35 +01:00
2017-08-28 20:51:22 +02:00
2017-09-07 11:53:11 +02:00
2018-09-20 11:10:00 +02:00
2018-10-13 10:44:28 +02:00
2019-01-16 22:18:11 +01:00
2018-01-29 19:39:59 -08:00
2018-02-22 15:42:23 +01:00
2017-07-06 11:30:07 -04:00
2017-07-25 18:05:25 +02:00
2017-09-25 08:56:05 -06:00
2018-09-09 19:55:54 +02:00
2019-02-20 10:43:03 +01:00
2017-08-06 20:55:29 -07:00
2018-02-22 19:18:40 +00:00
2018-10-04 16:14:47 -07:00
2017-07-06 16:24:30 -07:00
2017-08-16 16:28:47 -07:00
2018-04-26 11:37:46 +02:00
2018-11-13 11:15:11 -08:00
2017-07-24 17:50:37 +02:00
2018-09-10 09:21:07 +02:00
2017-08-31 18:50:14 +02:00
2017-08-15 09:02:07 -07:00
2017-08-15 09:02:08 -07:00