mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCHv5 00/10] add on-demand device creation
@ 2015-05-08 12:15 Sergey Senozhatsky
  2015-05-08 12:15 ` [PATCHv5 01/10] zram: add `compact` sysfs entry to documentation Sergey Senozhatsky
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Sergey Senozhatsky @ 2015-05-08 12:15 UTC (permalink / raw)
  To: Andrew Morton, Minchan Kim
  Cc: Nitin Gupta, linux-kernel, Sergey Senozhatsky, Sergey Senozhatsky

We currently don't support zram on-demand device creation.  The only way
to have N zram devices is to specify num_devices module parameter (default
value 1).  That means that if, for some reason, at some point, user wants
to have N + 1 devies he/she must umount all the existing devices, unload
the module, load the module passing num_devices equals to N + 1.

This patchset introduces 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

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

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

V5:
-- rename zram_add/zram_remove to hot_add/hot_remove (per Minchan's request)

V4:
-- add patch from Minchan to handle differently a deadlock suspected by lockdep
-- use zram->claim in zram_remove()

V3:
-- rebase against 4.1
-- review comments from Minchan were addressed
-- no sysfs RO tricks anymore

V2:
-- quick rebase and cleanup in attempt to catch 4.1 merge window

Minchan Kim (1):
  zram: close race by open overriding

Sergey Senozhatsky (9):
  zram: add `compact` sysfs entry to documentation
  zram: cosmetic ZRAM_ATTR_RO code formatting tweak
  zram: use idr instead of `zram_devices' array
  zram: reorganize code layout
  zram: remove max_num_devices limitation
  zram: report every added and removed device
  zram: trivial: correct flag operations comment
  zram: return zram device_id from zram_add()
  zram: add dynamic device add/remove functionality

 Documentation/ABI/testing/sysfs-class-zram |   24 +
 Documentation/blockdev/zram.txt            |   29 +-
 drivers/block/zram/zram_drv.c              | 1004 ++++++++++++++++------------
 drivers/block/zram/zram_drv.h              |   10 +-
 4 files changed, 614 insertions(+), 453 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-class-zram

-- 
2.4.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-05-08 12:18 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-08 12:15 [PATCHv5 00/10] add on-demand device creation Sergey Senozhatsky
2015-05-08 12:15 ` [PATCHv5 01/10] zram: add `compact` sysfs entry to documentation Sergey Senozhatsky
2015-05-08 12:15 ` [PATCHv5 02/10] zram: cosmetic ZRAM_ATTR_RO code formatting tweak Sergey Senozhatsky
2015-05-08 12:15 ` [PATCHv5 03/10] zram: use idr instead of `zram_devices' array Sergey Senozhatsky
2015-05-08 12:15 ` [PATCHv5 04/10] zram: reorganize code layout Sergey Senozhatsky
2015-05-08 12:15 ` [PATCHv5 05/10] zram: remove max_num_devices limitation Sergey Senozhatsky
2015-05-08 12:15 ` [PATCHv5 06/10] zram: report every added and removed device Sergey Senozhatsky
2015-05-08 12:15 ` [PATCHv5 07/10] zram: trivial: correct flag operations comment Sergey Senozhatsky
2015-05-08 12:15 ` [PATCHv5 08/10] zram: return zram device_id from zram_add() Sergey Senozhatsky
2015-05-08 12:15 ` [PATCHv5 09/10] zram: close race by open overriding Sergey Senozhatsky
2015-05-08 12:15 ` [PATCHv5 10/10] zram: add dynamic device add/remove functionality Sergey Senozhatsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®