public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: Benno Schulenberg <bensberg@justemail.net>
Cc: Util-Linux <util-linux@vger.kernel.org>
Subject: Re: [PATCH] docs: improve the description of --size in the man page of zramctl
Date: Tue, 12 Aug 2014 14:37:25 +0200	[thread overview]
Message-ID: <20140812123725.GM17719@x2.net.home> (raw)
In-Reply-To: <1407789244.2112503.151580837.566CF6FE@webmail.messagingengine.com>

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

  reply	other threads:[~2014-08-12 12:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2014-08-12 20:10     ` Benno Schulenberg
2014-08-20  9:01 ` Karel Zak

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=20140812123725.GM17719@x2.net.home \
    --to=kzak@redhat.com \
    --cc=bensberg@justemail.net \
    --cc=util-linux@vger.kernel.org \
    /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