Re: [PATCH] zram: introduce per-device debug_stat sysfs node

2016-05-13 Thread Sergey Senozhatsky
On (05/14/16 08:08), Minchan Kim wrote: [..] > Fortunately, Andrew isn't pick up this patch yet so I want to replace > it to below suggested by Sergey which is better. [..] > > + atomic64_inc(&zram->stats.writestall); looks good to me. thanks! -ss

Re: [PATCH] zram: introduce per-device debug_stat sysfs node

2016-05-13 Thread Sergey Senozhatsky
Hello Minchan, On (05/14/16 08:05), Minchan Kim wrote: [..] > > recompress: > > compress > > handle = zs_malloc FAST PATH > > > > if (!handle) { > > release stream > > handle = zs_malloc SLOW PATH > > > > << my patch accounts SLOW PATH here >> > >

Re: [PATCH] zram: introduce per-device debug_stat sysfs node

2016-05-13 Thread Minchan Kim
On Fri, May 13, 2016 at 10:03:58PM +0900, Sergey Senozhatsky wrote: > debug_stat sysfs is read-only and represents various debugging > data that zram developers may need. This file is not meant to be > used by anyone else: its content is not documented and will change > any time w/o any notice. Th

Re: [PATCH] zram: introduce per-device debug_stat sysfs node

2016-05-13 Thread Minchan Kim
Hello Sergey, On Fri, May 13, 2016 at 05:06:43PM +0900, Sergey Senozhatsky wrote: > On (05/13/16 16:20), Minchan Kim wrote: > > > > > @@ -737,12 +737,12 @@ static int zram_bvec_write(struct zram *zram, > > > > > struct bio_vec *bvec, u32 index, > > > > > zcomp_strm_release(zram->com

Re: [PATCH] zram: introduce per-device debug_stat sysfs node

2016-05-13 Thread Sergey Senozhatsky
On (05/13/16 16:20), Minchan Kim wrote: > > > > @@ -737,12 +737,12 @@ static int zram_bvec_write(struct zram *zram, > > > > struct bio_vec *bvec, u32 index, > > > > zcomp_strm_release(zram->comp, zstrm); > > > > zstrm = NULL; > > > > > > > > - atomic

Re: [PATCH] zram: introduce per-device debug_stat sysfs node

2016-05-13 Thread Sergey Senozhatsky
On (05/13/16 16:20), Minchan Kim wrote: [..] > > here I assume that the biggest contributor to re-compress latency is > > enabled preemption after zcomp_strm_release() and this second zs_malloc(). > > the compression itself of a PAGE_SIZE buffer should be fast enough. so IOW > > we would pass down

Re: [PATCH] zram: introduce per-device debug_stat sysfs node

2016-05-13 Thread Minchan Kim
On Fri, May 13, 2016 at 04:05:53PM +0900, Sergey Senozhatsky wrote: > On (05/13/16 15:58), Sergey Senozhatsky wrote: > > On (05/13/16 15:23), Minchan Kim wrote: > > [..] > > > @@ -737,12 +737,12 @@ static int zram_bvec_write(struct zram *zram, > > > struct bio_vec *bvec, u32 index, > > >

Re: [PATCH] zram: introduce per-device debug_stat sysfs node

2016-05-13 Thread Sergey Senozhatsky
On (05/13/16 15:58), Sergey Senozhatsky wrote: > On (05/13/16 15:23), Minchan Kim wrote: > [..] > > @@ -737,12 +737,12 @@ static int zram_bvec_write(struct zram *zram, struct > > bio_vec *bvec, u32 index, > > zcomp_strm_release(zram->comp, zstrm); > > zstrm = NULL; > > >

Re: [PATCH] zram: introduce per-device debug_stat sysfs node

2016-05-12 Thread Sergey Senozhatsky
On (05/13/16 15:23), Minchan Kim wrote: [..] > @@ -737,12 +737,12 @@ static int zram_bvec_write(struct zram *zram, struct > bio_vec *bvec, u32 index, > zcomp_strm_release(zram->comp, zstrm); > zstrm = NULL; > > - atomic64_inc(&zram->stats.num_recompress);

Re: [PATCH] zram: introduce per-device debug_stat sysfs node

2016-05-12 Thread Minchan Kim
On Fri, May 13, 2016 at 10:09:29AM +0900, Sergey Senozhatsky wrote: > Hello Minchan, > > On (05/13/16 08:41), Minchan Kim wrote: > [..] > > will fix and update, thanks! > > > > > @@ -719,6 +737,8 @@ compress_again: > > > zcomp_strm_release(zram->comp, zstrm); > > > zstrm = N

Re: [PATCH] zram: introduce per-device debug_stat sysfs node

2016-05-12 Thread Sergey Senozhatsky
Hello Minchan, On (05/13/16 08:41), Minchan Kim wrote: [..] will fix and update, thanks! > > @@ -719,6 +737,8 @@ compress_again: > > zcomp_strm_release(zram->comp, zstrm); > > zstrm = NULL; > > > > + atomic64_inc(&zram->stats.num_recompress); > > + > > It sh

Re: [PATCH] zram: introduce per-device debug_stat sysfs node

2016-05-12 Thread Minchan Kim
Hello Sergey, On Wed, May 11, 2016 at 10:45:53PM +0900, Sergey Senozhatsky wrote: > debug_stat sysfs is read-only and represents various debugging > data that zram developers may need. This file is not meant to be > used by anyone else: its content is not documented and will change > any time w/o