lkml.org 
[lkml]   [2015]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 6/6] zram: export new 'mm_stat' sysfs attrs
On (03/12/15 10:41), Minchan Kim wrote:
> Any user doesn't take care of document. I think we should add
> pr_warn_once to notify the user if he tried deprecated interface.

yes, that was something I didn't want to include into this patch.
I agree that some sort of a warning should go into the logs. do
you want me to add pr_warn_once() to every _show() function?

having this in documentation will not do any harm, so let's keep it
there as well.

> In addition, we should add deprecated interface in Documentation/ABI/obsolete/
>

didn't know about that. ok, will send "deprecate old attrs" patch that will
add deprecated attrs to Documentation/ABI/obsolete/ and add pr_warn_once().


> >
> > Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> > ---
> > Documentation/ABI/testing/sysfs-block-zram | 8 ++++++++
> > Documentation/blockdev/zram.txt | 18 +++++++++++++++++
> > drivers/block/zram/zram_drv.c | 31 ++++++++++++++++++++++++++++++
> > 3 files changed, 57 insertions(+)
> >
> > diff --git a/Documentation/ABI/testing/sysfs-block-zram b/Documentation/ABI/testing/sysfs-block-zram
> > index a7f622f..8114c81 100644
> > --- a/Documentation/ABI/testing/sysfs-block-zram
> > +++ b/Documentation/ABI/testing/sysfs-block-zram
> > @@ -158,3 +158,11 @@ Description:
> > statistics not accounted by block layer. For example,
> > failed_reads, failed_writes, etc. File format is similar to
> > block layer statistics file format.
> > +
> > +What: /sys/block/zram<id>/mm_stat
> > +Date: August 2015
> > +Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> > +Description:
> > + The mm_stat file is read-only and accumulates device's mm
> > + statistics (orig_data_size, compr_data_size, etc.) in a format
>
> Every field in mm_stat doesn't mean accumulation.
>

agree. bad wording. only num_migrated shows the accumulated number.
will send a trivial patch later.

-ss


\
 
 \ /
  Last update: 2015-03-12 03:01    [W:1.304 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site