public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] docs: improve the description of --size in the man page of zramctl
@ 2014-08-11 20:23 Benno Schulenberg
  2014-08-11 20:34 ` Benno Schulenberg
  2014-08-20  9:01 ` Karel Zak
  0 siblings, 2 replies; 5+ messages in thread
From: Benno Schulenberg @ 2014-08-11 20:23 UTC (permalink / raw)
  To: util-linux

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
 sys-utils/zramctl.8 |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/sys-utils/zramctl.8 b/sys-utils/zramctl.8
index a308233..6f82ccf 100644
--- a/sys-utils/zramctl.8
+++ b/sys-utils/zramctl.8
@@ -67,15 +67,10 @@ Reset the options of the specified zram device(s).  Zram device settings
 can be changed only after a reset.
 .TP
 .BR \-s , " \-\-size " \fIsize
-Force the zram driver to reread the size of the file associated with
-the specified zram device.  When not specified the
-.I size
-unit is bytes.  The zram devices size is page size aligned.  When
-requested
-.I size
-does match with page size the device be large enough to hold the reqested
-.I size
-plus length to next page boundary.
+Create a zram device of the specified \fIsize\fR.
+Zram devices are aligned to memory pages; when the requested \fIsize\fR is
+not a multiple of the page size, it will be rounded up to the next multiple.
+When not otherwise specified, the unit of the \fIsize\fR parameter is bytes.
 .IP
 The \fIsize\fR argument may be followed by the multiplicative suffixes KiB (=1024),
 MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB and YiB (the "iB"
-- 
1.7.0.4


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

* Re: [PATCH] docs: improve the description of --size in the man page of zramctl
  2014-08-11 20:23 [PATCH] docs: improve the description of --size in the man page of zramctl Benno Schulenberg
@ 2014-08-11 20:34 ` Benno Schulenberg
  2014-08-12 12:37   ` Karel Zak
  2014-08-20  9:01 ` Karel Zak
  1 sibling, 1 reply; 5+ messages in thread
From: Benno Schulenberg @ 2014-08-11 20:34 UTC (permalink / raw)
  To: Util-Linux


On Mon, Aug 11, 2014, at 22:23, Benno Schulenberg wrote:
> The zram devices size is page size aligned.  When
> -requested
> -.I size
> -does match with page size the device be large enough to hold the reqested
> -.I size
> -plus length to next page boundary.

The above does not parse for me.  I am not in a position to test
zram devices, so to be sure that my replacement text is correct,
the following question: when one passes with --size a number that
is not a multiple of the memory-page size, does a subsequent call
of 'zramctl --raw' then print the aligned (rounded-up) number, or
does it still print the size that was specified although in fact
the aligned, bigger number is being used?

Benno

-- 
http://www.fastmail.fm - A no graphics, no pop-ups email service


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

* Re: [PATCH] docs: improve the description of --size in the man page of zramctl
  2014-08-11 20:34 ` Benno Schulenberg
@ 2014-08-12 12:37   ` Karel Zak
  2014-08-12 20:10     ` Benno Schulenberg
  0 siblings, 1 reply; 5+ messages in thread
From: Karel Zak @ 2014-08-12 12:37 UTC (permalink / raw)
  To: Benno Schulenberg; +Cc: Util-Linux

On Mon, Aug 11, 2014 at 10:34:04PM +0200, Benno Schulenberg wrote:
> 
> On Mon, Aug 11, 2014, at 22:23, Benno Schulenberg wrote:
> > The zram devices size is page size aligned.  When
> > -requested
> > -.I size
> > -does match with page size the device be large enough to hold the reqested
> > -.I size
> > -plus length to next page boundary.
> 
> The above does not parse for me.  I am not in a position to test
> zram devices, so to be sure that my replacement text is correct,

  # modprobe zram 

  # ./zramctl --find --size $((4096 * 1000 + 100 ))
  /dev/zram0

  # echo $(( 4096 * 1000 + 100))
  4096100
  
  # ./zramctl --bytes -n -o DISKSIZE
  4100096


> the following question: when one passes with --size a number that
> is not a multiple of the memory-page size, does a subsequent call
> of 'zramctl --raw' then print the aligned (rounded-up) number, or
> does it still print the size that was specified although in fact
> the aligned, bigger number is being used?

 The kernel uses the aligned $size and nowhere is stored the original
 size, so zramctl returns the aligned (rounded-up) number.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

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

* Re: [PATCH] docs: improve the description of --size in the man page of zramctl
  2014-08-12 12:37   ` Karel Zak
@ 2014-08-12 20:10     ` Benno Schulenberg
  0 siblings, 0 replies; 5+ messages in thread
From: Benno Schulenberg @ 2014-08-12 20:10 UTC (permalink / raw)
  To: Karel Zak; +Cc: Util-Linux


On Tue, Aug 12, 2014, at 14:37, Karel Zak wrote:
>  The kernel uses the aligned $size and nowhere is stored the original
>  size, so zramctl returns the aligned (rounded-up) number.

Okay.  Then my replacement text is valid.

Benno

-- 
http://www.fastmail.fm - A fast, anti-spam email service.

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

* Re: [PATCH] docs: improve the description of --size in the man page of zramctl
  2014-08-11 20:23 [PATCH] docs: improve the description of --size in the man page of zramctl Benno Schulenberg
  2014-08-11 20:34 ` Benno Schulenberg
@ 2014-08-20  9:01 ` Karel Zak
  1 sibling, 0 replies; 5+ messages in thread
From: Karel Zak @ 2014-08-20  9:01 UTC (permalink / raw)
  To: Benno Schulenberg; +Cc: util-linux

On Mon, Aug 11, 2014 at 10:23:39PM +0200, Benno Schulenberg wrote:
>  sys-utils/zramctl.8 |   13 ++++---------
>  1 files changed, 4 insertions(+), 9 deletions(-)

 Applied, thanks.

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

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

end of thread, other threads:[~2014-08-20  9:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-11 20:23 [PATCH] docs: improve the description of --size in the man page of zramctl Benno Schulenberg
2014-08-11 20:34 ` Benno Schulenberg
2014-08-12 12:37   ` Karel Zak
2014-08-12 20:10     ` Benno Schulenberg
2014-08-20  9:01 ` Karel Zak

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