From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Minchan Kim <minchan@kernel.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Nitin Gupta <ngupta@vflare.org>,
linux-kernel@vger.kernel.org,
Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Subject: Re: [PATCHv2 06/10] zram: remove max_num_devices limitation
Date: Thu, 23 Apr 2015 13:24:54 +0900 [thread overview]
Message-ID: <20150423042454.GC724@swordfish> (raw)
In-Reply-To: <20150423023636.GE24928@blaptop>
On (04/23/15 11:36), Minchan Kim wrote:
> Date: Thu, 23 Apr 2015 11:36:36 +0900
> From: Minchan Kim <minchan@kernel.org>
> To: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>, Nitin Gupta
> <ngupta@vflare.org>, linux-kernel@vger.kernel.org, Sergey Senozhatsky
> <sergey.senozhatsky.work@gmail.com>
> Subject: Re: [PATCHv2 06/10] zram: remove max_num_devices limitation
> User-Agent: Mutt/1.5.23 (2014-03-12)
>
> On Thu, Apr 16, 2015 at 08:55:52PM +0900, Sergey Senozhatsky wrote:
> > Limiting the number of zram devices to 32 (default max_num_devices value)
> > is confusing, let's drop it. A user with 2TB or 4TB of RAM, for example,
> > can request as many devices as he can handle.
> >
> > Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> Acked-by: Minchan Kim <minchan@kernel.org>
>
> I don't know you intentionally add new empty lines to make it clear
> below but it's not related to this patch but I'm okay although you
> did it to make to look better. Othewise, please fix when you respin.
>
no reason. was a bit in a hurry trying to redo the set for 4.1 merge window
and not to miss anything. will clean up.
-ss
> > ---
> > Documentation/blockdev/zram.txt | 8 +++++++-
> > drivers/block/zram/zram_drv.c | 8 +-------
> > drivers/block/zram/zram_drv.h | 6 ------
> > 3 files changed, 8 insertions(+), 14 deletions(-)
> >
> > diff --git a/Documentation/blockdev/zram.txt b/Documentation/blockdev/zram.txt
> > index bef4998..2ccc741 100644
> > --- a/Documentation/blockdev/zram.txt
> > +++ b/Documentation/blockdev/zram.txt
> > @@ -19,7 +19,9 @@ Following shows a typical sequence of steps for using zram.
> > 1) Load Module:
> > modprobe zram num_devices=4
> > This creates 4 devices: /dev/zram{0,1,2,3}
> > - (num_devices parameter is optional. Default: 1)
> > +
> > +num_devices parameter is optional and tells zram how many devices should be
> > +pre-created. Default: 1.
> >
> > 2) Set max number of compression streams
> > Compression backend may use up to max_comp_streams compression streams,
> > @@ -128,6 +130,7 @@ mem_limit RW the maximum amount of memory ZRAM can use to store
> > num_migrated RO the number of objects migrated migrated by compaction
> > compact WO trigger memory compaction
> >
> > +
>
> ?
>
> > WARNING
> > =======
> > per-stat sysfs attributes are considered to be deprecated.
> > @@ -149,6 +152,7 @@ File /sys/block/zram<id>/stat
> > Represents block layer statistics. Read Documentation/block/stat.txt for
> > details.
> >
> > +
>
> ?
>
> > File /sys/block/zram<id>/io_stat
> >
> > The stat file represents device's I/O statistics not accounted by block
> > @@ -160,6 +164,7 @@ whitespace:
> > invalid_io
> > notify_free
> >
> > +
>
> ?
>
> > File /sys/block/zram<id>/mm_stat
> >
> > The stat file represents device's mm statistics. It consists of a single
> > @@ -172,6 +177,7 @@ line of text and contains the following stats separated by whitespace:
> > zero_pages
> > num_migrated
> >
> > +
>
> ?
>
> > 8) Deactivate:
> > swapoff /dev/zram0
> > umount /dev/zram1
> > diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
> > index e526fe1..c2d9b76 100644
> > --- a/drivers/block/zram/zram_drv.c
> > +++ b/drivers/block/zram/zram_drv.c
> > @@ -1288,12 +1288,6 @@ static int __init zram_init(void)
> > {
> > int ret, dev_id;
> >
> > - if (num_devices > max_num_devices) {
> > - pr_warn("Invalid value for num_devices: %u\n",
> > - num_devices);
> > - return -EINVAL;
> > - }
> > -
> > zram_major = register_blkdev(0, "zram");
> > if (zram_major <= 0) {
> > pr_warn("Unable to get major number\n");
> > @@ -1323,7 +1317,7 @@ module_init(zram_init);
> > module_exit(zram_exit);
> >
> > module_param(num_devices, uint, 0);
> > -MODULE_PARM_DESC(num_devices, "Number of zram devices");
> > +MODULE_PARM_DESC(num_devices, "Number of pre-created zram devices");
> >
> > MODULE_LICENSE("Dual BSD/GPL");
> > MODULE_AUTHOR("Nitin Gupta <ngupta@vflare.org>");
> > diff --git a/drivers/block/zram/zram_drv.h b/drivers/block/zram/zram_drv.h
> > index 570c598..042994e 100644
> > --- a/drivers/block/zram/zram_drv.h
> > +++ b/drivers/block/zram/zram_drv.h
> > @@ -20,12 +20,6 @@
> >
> > #include "zcomp.h"
> >
> > -/*
> > - * Some arbitrary value. This is just to catch
> > - * invalid value for num_devices module parameter.
> > - */
> > -static const unsigned max_num_devices = 32;
> > -
> > /*-- Configurable parameters */
> >
> > /*
> > --
> > 2.4.0.rc2
> >
>
> --
> Kind regards,
> Minchan Kim
>
next prev parent reply other threads:[~2015-04-23 4:24 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
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=20150423042454.GC724@swordfish \
--to=sergey.senozhatsky.work@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=minchan@kernel.org \
--cc=ngupta@vflare.org \
--cc=sergey.senozhatsky@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 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.