Skip to content

Commit

Permalink
mm/zswap.c: change params from hidden to ro
Browse files Browse the repository at this point in the history
The "compressor" and "enabled" params are currently hidden, this changes
them to read-only, so userspace can tell if zswap is enabled or not and
see what compressor is in use.

Signed-off-by: Dan Streetman <[email protected]>
Cc: Vladimir Murzin <[email protected]>
Cc: Bob Liu <[email protected]>
Cc: Minchan Kim <[email protected]>
Cc: Weijie Yang <[email protected]>
Acked-by: Seth Jennings <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
ddstreet authored and torvalds committed Jan 24, 2014
1 parent 57ea817 commit 12ab028
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mm/zswap.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ static u64 zswap_duplicate_entry;
**********************************/
/* Enable/disable zswap (disabled by default, fixed at boot for now) */
static bool zswap_enabled __read_mostly;
module_param_named(enabled, zswap_enabled, bool, 0);
module_param_named(enabled, zswap_enabled, bool, 0444);

/* Compressor to be used by zswap (fixed at boot for now) */
#define ZSWAP_COMPRESSOR_DEFAULT "lzo"
static char *zswap_compressor = ZSWAP_COMPRESSOR_DEFAULT;
module_param_named(compressor, zswap_compressor, charp, 0);
module_param_named(compressor, zswap_compressor, charp, 0444);

/* The maximum percentage of memory that the compressed pool can occupy */
static unsigned int zswap_max_pool_percent = 20;
Expand Down

0 comments on commit 12ab028

Please sign in to comment.