From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Minchan Kim <minchan@kernel.org>
Cc: Nitin Gupta <ngupta@vflare.org>,
linux-kernel@vger.kernel.org,
Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Subject: [PATCHv4 00/10] add on-demand device creation
Date: Mon, 4 May 2015 21:38:52 +0900 [thread overview]
Message-ID: <1430743142-15854-1-git-send-email-sergey.senozhatsky@gmail.com> (raw)
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:
- zram_add -- add a new zram device
- zram_remove -- remove a specific (device_id) zram device
Usage example:
# add a new specific zram device
cat /sys/class/zram-control/zram_add
1
# remove a specific zram device
echo 4 > /sys/class/zram-control/zram_remove
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 | 1002 ++++++++++++++++------------
drivers/block/zram/zram_drv.h | 10 +-
4 files changed, 612 insertions(+), 453 deletions(-)
create mode 100644 Documentation/ABI/testing/sysfs-class-zram
--
2.4.0
next reply other threads:[~2015-05-04 12:39 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-04 12:38 Sergey Senozhatsky [this message]
2015-05-04 12:38 ` [PATCHv4 01/10] zram: add `compact` sysfs entry to documentation Sergey Senozhatsky
2015-05-04 12:38 ` [PATCHv4 02/10] zram: cosmetic ZRAM_ATTR_RO code formatting tweak Sergey Senozhatsky
2015-05-04 12:38 ` [PATCHv4 03/10] zram: use idr instead of `zram_devices' array Sergey Senozhatsky
2015-05-04 12:38 ` [PATCHv4 04/10] zram: reorganize code layout Sergey Senozhatsky
2015-05-04 12:38 ` [PATCHv4 05/10] zram: remove max_num_devices limitation Sergey Senozhatsky
2015-05-04 12:38 ` [PATCHv4 06/10] zram: report every added and removed device Sergey Senozhatsky
2015-05-04 12:38 ` [PATCHv4 07/10] zram: trivial: correct flag operations comment Sergey Senozhatsky
2015-05-04 12:39 ` [PATCHv4 08/10] zram: return zram device_id from zram_add() Sergey Senozhatsky
2015-05-04 12:39 ` [PATCHv4 09/10] zram: close race by open overriding Sergey Senozhatsky
2015-05-04 12:39 ` [PATCHv4 10/10] zram: add dynamic device add/remove functionality Sergey Senozhatsky
2015-05-06 5:01 ` [PATCHv4 00/10] add on-demand device creation Minchan Kim
2015-05-06 5:25 ` Sergey Senozhatsky
2015-05-06 6:52 ` Minchan Kim
2015-05-06 7:07 ` Sergey Senozhatsky
2015-05-06 7:28 ` Minchan Kim
2015-05-06 8:10 ` Sergey Senozhatsky
2015-05-06 8:20 ` Minchan Kim
2015-05-07 0:33 ` Sergey Senozhatsky
2015-05-07 7:41 ` Minchan Kim
2015-05-07 12:09 ` Sergey Senozhatsky
2015-05-07 13:04 ` Sergey Senozhatsky
2015-05-07 15:11 ` Minchan Kim
2015-05-08 0:15 ` Sergey Senozhatsky
2015-05-10 8:47 ` Sergey Senozhatsky
2015-05-06 5:31 ` Sergey Senozhatsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1430743142-15854-1-git-send-email-sergey.senozhatsky@gmail.com \
--to=sergey.senozhatsky@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=minchan@kernel.org \
--cc=ngupta@vflare.org \
--cc=sergey.senozhatsky.work@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®