linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Ganesh Mahendran <opensource.ganesh@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Nitin Gupta <ngupta@vflare.org>, Linux-MM <linux-mm@kvack.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] mm/zsmalloc: add statistics support
Date: Sat, 20 Dec 2014 11:25:57 +0900	[thread overview]
Message-ID: <20141220022557.GA19822@blaptop> (raw)
In-Reply-To: <CADAEsF-=RwwR2D_LzhVYKhfmfPCsQE73bJYyH=tjn4BtHVrdew@mail.gmail.com>

Hey Ganesh,

On Sat, Dec 20, 2014 at 09:43:34AM +0800, Ganesh Mahendran wrote:
> 2014-12-20 8:23 GMT+08:00 Minchan Kim <minchan@kernel.org>:
> > On Fri, Dec 19, 2014 at 04:17:56PM -0800, Andrew Morton wrote:
> >> On Sat, 20 Dec 2014 09:10:43 +0900 Minchan Kim <minchan@kernel.org> wrote:
> >>
> >> > > It involves rehashing a lengthy argument with Greg.
> >> >
> >> > Okay. Then, Ganesh,
> >> > please add warn message about duplicaed name possibility althoug
> >> > it's unlikely as it is.
> >>
> >> Oh, getting EEXIST is easy with this patch.  Just create and destroy a
> >> pool 2^32 times and the counter wraps ;) It's hardly a serious issue
> >> for a debugging patch.
> >
> > I meant that I wanted to change from index to name passed from caller like this
> >
> > zram:
> >         zs_create_pool(GFP_NOIO | __GFP_HIGHMEM, zram->disk->first_minor);
> >
> > So, duplication should be rare. :)
> 
> We still can not know whether the name is duplicated if we do not
> change the debugfs API.
> The API does not return the errno to us.
> 
> How about just zsmalloc decides the name of the pool-id, like pool-x.
> When the pool-id reaches
> 0xffff.ffff, we print warn message about duplicated name, and stop
> creating the debugfs entry
> for the user.

The idea is from the developer point of view to implement thing easy
but my point is we should take care of user(ie, admin) rather than
developer(ie, we).

For user, /sys/kernel/debug/zsmalloc/zram0 would be more
straightforward and even it doesn't need zram to export
/sys/block/zram0/pool-id.

Thanks.

> 
> Thanks.

  reply	other threads:[~2014-12-20  2:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-19 12:55 [PATCH v2] mm/zsmalloc: add statistics support Ganesh Mahendran
2014-12-19 22:32 ` Andrew Morton
2014-12-19 23:39   ` Minchan Kim
2014-12-19 23:45     ` Andrew Morton
2014-12-19 23:58       ` Minchan Kim
2014-12-20  0:06         ` Andrew Morton
2014-12-20  0:10           ` Minchan Kim
2014-12-20  0:17             ` Andrew Morton
2014-12-20  0:23               ` Minchan Kim
2014-12-20  0:54                 ` Minchan Kim
2014-12-20  1:43                 ` Ganesh Mahendran
2014-12-20  2:25                   ` Minchan Kim [this message]
2014-12-23  2:26                     ` Ganesh Mahendran
2014-12-23  2:40                       ` Minchan Kim
2015-01-12 20:07                         ` Seth Jennings
2014-12-20  1:35   ` Ganesh Mahendran

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=20141220022557.GA19822@blaptop \
    --to=minchan@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ngupta@vflare.org \
    --cc=opensource.ganesh@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).