All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv2 00/10] cleaned up on-demand device creation
@ 2015-04-16 11:55 Sergey Senozhatsky
  2015-04-16 11:55 ` [PATCHv2 01/10] zram: enable compaction support in zram Sergey Senozhatsky
                   ` (11 more replies)
  0 siblings, 12 replies; 32+ messages in thread
From: Sergey Senozhatsky @ 2015-04-16 11:55 UTC (permalink / raw)
  To: Andrew Morton, Minchan Kim
  Cc: Nitin Gupta, linux-kernel, Sergey Senozhatsky, Sergey Senozhatsky

Hello,

resending on-demand device creation patch set. sadly, I managed to create a
mess; so here is my take to clean it up, fold patches and, hopefully, see
them in 4.1.

this mess will not happen again.


Andrew picked up some of the commits lined up for 4.1, which required manual
editing. sorry for that inconvenience.


unfortunately, commit c72c6160d967ed26a0b136dbab337f821d233509
  Author: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
  Date:   Wed Apr 15 16:15:55 2015 -0700

     zram: move compact_store() to sysfs functions area


ended up to be different: from a cosmetic change it has transformed into
a functional change.

I fix it in 0001-zram-enable-compaction-support-in-zram.patch.


the rest is functionally identical to what we had in linux-next and mmotm for
quite some time: in linux-next since Wed Apr 8 09:44:43 2015 +1000
(commit 273b0791dae2f0b).

it would be nice to see it in 4.1, if possible.

no functional change in zram_drv.c file, compared to zram_drv.c from
linux-next-20150415 (yes, actually checked). just a couple of additional
comment tweaks.

like:

-/* allocate and initialize new zram device. the function returns
- * '>= 0' device_id upon success, and negative value otherwise. */
+/*
+ * Allocate and initialize new zram device. the function returns
+ * '>= 0' device_id upon success, and negative value otherwise.
+ */

or

        /*
         * First, make ->disksize device attr RO, closing
-        * ZRAM_CTL_REMOVE vs disksize_store() race window
+        * zram_remove() vs disksize_store() race window
         */


I also picked up the remaining part of Julia Lawall's
<Julia.Lawall@lip6.fr> ("zram: fix error return code") commit.

Documentation is identical to linux-next-20150415 version.


8<-------

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.  And do
this again, if needed.

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

The patchset also does some cleanups and huge code reorganization.


-ss


Sergey Senozhatsky (10):
  zram: enable compaction support in zram
  zram: cosmetic ZRAM_ATTR_RO code formatting tweak
  zram: use idr instead of `zram_devices' array
  zram: factor out device reset from reset_store()
  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 value from zram_add()
  zram: add dynamic device add/remove functionality

 Documentation/ABI/testing/sysfs-class-zram |  24 +
 Documentation/blockdev/zram.txt            |  31 +-
 drivers/block/zram/zram_drv.c              | 939 +++++++++++++++++------------
 drivers/block/zram/zram_drv.h              |   6 -
 4 files changed, 597 insertions(+), 403 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-class-zram

-- 
2.4.0.rc1.29.gecc46a1


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

end of thread, other threads:[~2015-04-23  6:20 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-16 11:55 [PATCHv2 00/10] cleaned up on-demand device creation Sergey Senozhatsky
2015-04-16 11:55 ` [PATCHv2 01/10] zram: enable compaction support in zram Sergey Senozhatsky
2015-04-16 11:55 ` [PATCHv2 02/10] zram: cosmetic ZRAM_ATTR_RO code formatting tweak Sergey Senozhatsky
2015-04-23  2:16   ` Minchan Kim
2015-04-16 11:55 ` [PATCHv2 03/10] zram: use idr instead of `zram_devices' array Sergey Senozhatsky
2015-04-23  2:23   ` Minchan Kim
2015-04-23  4:30     ` Sergey Senozhatsky
2015-04-16 11:55 ` [PATCHv2 04/10] zram: factor out device reset from reset_store() Sergey Senozhatsky
2015-04-23  2:29   ` Minchan Kim
2015-04-23  4:26     ` Sergey Senozhatsky
2015-04-16 11:55 ` [PATCHv2 05/10] zram: reorganize code layout Sergey Senozhatsky
2015-04-23  2:32   ` Minchan Kim
2015-04-16 11:55 ` [PATCHv2 06/10] zram: remove max_num_devices limitation Sergey Senozhatsky
2015-04-23  2:36   ` Minchan Kim
2015-04-23  4:24     ` Sergey Senozhatsky
2015-04-16 11:55 ` [PATCHv2 07/10] zram: report every added and removed device Sergey Senozhatsky
2015-04-23  2:38   ` Minchan Kim
2015-04-23  4:23     ` Sergey Senozhatsky
2015-04-16 11:55 ` [PATCHv2 08/10] zram: trivial: correct flag operations comment Sergey Senozhatsky
2015-04-23  2:40   ` Minchan Kim
2015-04-16 11:55 ` [PATCHv2 09/10] zram: return zram device_id value from zram_add() Sergey Senozhatsky
2015-04-23  2:41   ` Minchan Kim
2015-04-16 11:55 ` [PATCHv2 10/10] zram: add dynamic device add/remove functionality Sergey Senozhatsky
2015-04-23  3:06   ` Minchan Kim
2015-04-23  3:12     ` Minchan Kim
2015-04-23  4:23     ` Sergey Senozhatsky
2015-04-23  6:20       ` Minchan Kim
2015-04-16 23:23 ` [PATCHv2 00/10] cleaned up on-demand device creation Minchan Kim
2015-04-17  0:27   ` Sergey Senozhatsky
2015-04-17  0:39   ` Sergey Senozhatsky
2015-04-17  1:00 ` Sergey Senozhatsky
2015-04-17  1:32   ` 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.