All of lore.kernel.org
 help / color / mirror / Atom feed
* what's cooking in zram for 4.2
@ 2015-08-13  0:58 Sergey Senozhatsky
  0 siblings, 0 replies; only message in thread
From: Sergey Senozhatsky @ 2015-08-13  0:58 UTC (permalink / raw)
  To: Karel Zak
  Cc: Minchan Kim, Sergey Senozhatsky, Sergey Senozhatsky, linux-kernel,
	util-linux

Hello Karel,

... planned to write this earlier.


zram will see some user-space visible improvements in 4.2 we'd love
to let you know about -- on-demand device creation/removal.

For that purpose we introduce zram control sysfs class, which has two
sysfs attrs:
 - hot_add      -- add a new zram device
 - hot_remove   -- remove a specific (device_id) zram device


-- hot_add sysfs attr is read-only and has only automatic device id
assignment mode.  Read operation performed on this attr creates a
new zram device and returns back its device_id (or error (ret < 0)).

Usage example:
  # add a new zram device
  cat /sys/class/zram-control/hot_add
  2

an example of returning error code (-ENOMEM in this case)

  cat /sys/class/zram-control/hot_add
  cat: /sys/class/zram-control/hot_add: Cannot allocate memory



-- hot_remove is write only and requires a valid zram device_id as
its input parameter:

  # remove a specific zram device
  echo 4 > /sys/class/zram-control/hot_remove


	-ss

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-08-13  0:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-13  0:58 what's cooking in zram for 4.2 Sergey Senozhatsky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.