lkml.org 
[lkml]   [2014]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH v2] mm/zsmalloc: add statistics support
    From
    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.

    Thanks.


    \
     
     \ /
      Last update: 2014-12-20 03:21    [W:5.782 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site