From: Nitin Gupta <ngupta@vflare.org>
To: Greg KH <greg@kroah.com>
Cc: Jerome Marchand <jmarchan@redhat.com>,
Pekka Enberg <penberg@cs.helsinki.fi>,
Robert Jennings <rcj@linux.vnet.ibm.com>,
Linux Driver Project <devel@linuxdriverproject.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 5/5] zram: Set initial disksize to some default value
Date: Sat, 10 Sep 2011 10:51:49 -0400 [thread overview]
Message-ID: <4E6B7985.5080709@vflare.org> (raw)
In-Reply-To: <20110910004238.GB27110@kroah.com>
On 09/09/2011 08:42 PM, Greg KH wrote:
> On Fri, Sep 09, 2011 at 08:18:56PM -0400, Nitin Gupta wrote:
>> On 09/09/2011 07:12 PM, Greg KH wrote:
>>
>>> On Fri, Sep 09, 2011 at 07:01:04PM -0400, Nitin Gupta wrote:
>>>> Currently, we set initial disksize as 0, which forces
>>>> user to write some value to corresponding zram device's
>>>> sysfs node, before the device can be used. Now, we avoid
>>>> this step by providing some default size initially.
>>>>
>>>> To change the disksize, user must:
>>>> - Reset disk.
>>>> Ex: echo 1 > /sys/block/zram0/reset
>>>> (NOTE: disksize is set to the default value after reset)
>>>>
>>>> - Set new disksize.
>>>> Ex: echo $((256*1024*1024)) > /sys/block/zram0/disksize
>>>
>>> So, what tools just broke with this change?
>>>
>>> And where is the sysfs file documentation change that should go along
>>> with this?
>>>
>>
>>
>> This change does not change any sysfs names or behavior, so does not
>> break any scripts that assume the current behavior. I also verified that
>> sysfs documentation (ABI/testing/sysfs-block-zram) need not be changed
>> and same with drivers/staging/zram/zram.txt.
>
> Huh, you just said the behavior changed as described in your comment
> above. You said the user no longer has to do a step to accomplish
> something. What happens if they do do that after this patch?
>
The current documentation states that:
"" (from drivers/staging/zram/zram.txt)
2) Set Disksize (Optional):
Set disk size by writing the value to sysfs node 'disksize'
(in bytes). If disksize is not given, default value of 25%
of RAM is used.
""
So existing code did not correctly implement this behavior -- user had
to set a disksize for zram to be usable. With this patch, the code now
behaves exactly as described in documentation. So, we now avoid the
extra step of setting a disksize as documented. The user can still, of
course, set another disk value if needed.
So, in summary, no documentation changes are required with this change.
I will also add this explanation in changelog when submitting v4 patches.
Thanks,
Nitin
next prev parent reply other threads:[~2011-09-10 14:51 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-09 23:00 [PATCH 0/5 v3] zram: minor cleanups and features Nitin Gupta
2011-09-09 23:01 ` [PATCH 1/5] zram: Fix sparse warnings Nitin Gupta
2011-09-09 23:01 ` [PATCH 2/5] zram: Kernel config option for number of devices Nitin Gupta
2011-09-09 23:09 ` Greg KH
2011-09-10 2:15 ` Nitin Gupta
2011-09-09 23:01 ` [PATCH 3/5] zram: Make gobal variables use unique names Nitin Gupta
2011-09-09 23:10 ` Greg KH
2011-09-10 0:35 ` Nitin Gupta
2011-09-10 0:45 ` Greg KH
2011-09-09 23:01 ` [PATCH 4/5] zram: Simplify zram disk resizing interface Nitin Gupta
2011-09-09 23:11 ` Greg KH
2011-09-10 0:12 ` Nitin Gupta
2011-09-10 0:41 ` Greg KH
2011-09-09 23:01 ` [PATCH 5/5] zram: Set initial disksize to some default value Nitin Gupta
2011-09-09 23:12 ` Greg KH
2011-09-10 0:18 ` Nitin Gupta
2011-09-10 0:42 ` Greg KH
2011-09-10 14:51 ` Nitin Gupta [this message]
2011-09-10 0:50 ` Valdis.Kletnieks
2011-09-10 2:04 ` Nitin Gupta
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=4E6B7985.5080709@vflare.org \
--to=ngupta@vflare.org \
--cc=devel@linuxdriverproject.org \
--cc=greg@kroah.com \
--cc=jmarchan@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=penberg@cs.helsinki.fi \
--cc=rcj@linux.vnet.ibm.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.