[Devel] [PATCH rh7] tcache/tswap: enable by default

Vladimir Davydov vdavydov at virtuozzo.com
Wed Feb 17 06:31:15 PST 2016


These subsystems has proven to be stable, so let's enable them by
default. If anything goes wrong, they can always be disabled by writing
'N' to /sys/module/{tcache,tswap}/parameters/active.

Currently tcache/tswap are enabled by vcmmd, but I want to drop this
code from there.

Signed-off-by: Vladimir Davydov <vdavydov at virtuozzo.com>
---
 mm/tcache.c | 2 +-
 mm/tswap.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/tcache.c b/mm/tcache.c
index 61978ef2225d..94c17f9d238b 100644
--- a/mm/tcache.c
+++ b/mm/tcache.c
@@ -169,7 +169,7 @@ static bool tcache_enabled __read_mostly = true;
 module_param_named(enabled, tcache_enabled, bool, 0444);
 
 /* Enable/disable populating the cache */
-static bool tcache_active __read_mostly;
+static bool tcache_active __read_mostly = true;
 module_param_named(active, tcache_active, bool, 0644);
 
 /*
diff --git a/mm/tswap.c b/mm/tswap.c
index 01953b4e111e..20c952b4716c 100644
--- a/mm/tswap.c
+++ b/mm/tswap.c
@@ -31,7 +31,7 @@ static bool tswap_enabled __read_mostly = true;
 module_param_named(enabled, tswap_enabled, bool, 0444);
 
 /* Enable/disable populating the cache */
-static bool tswap_active __read_mostly;
+static bool tswap_active __read_mostly = true;
 module_param_named(active, tswap_active, bool, 0644);
 
 /* Total number of pages cached */
-- 
2.1.4



More information about the Devel mailing list