[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160513065805.GB615@swordfish>
Date: Fri, 13 May 2016 15:58:05 +0900
From: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To: Minchan Kim <minchan@...nel.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH] zram: introduce per-device debug_stat sysfs node
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);
> -
> handle = zs_malloc(meta->mem_pool, clen,
> GFP_NOIO | __GFP_HIGHMEM);
> - if (handle)
> + if (handle) {
> + atomic64_inc(&zram->stats.num_recompress);
> goto compress_again;
> + }
not like a real concern...
the main (and only) purpose of num_recompress is to match performance
slowdowns and failed fast write paths (when the first zs_malloc() fails).
this matching is depending on successful second zs_malloc(), but if it's
also unsuccessful we would only increase failed_writes; w/o increasing
the failed fast write counter, while we actually would have failed fast
write and extra zs_malloc() [unaccounted in this case]. yet it's probably
a bit unlikely to happen, but still. well, just saying.
-ss
Powered by blists - more mailing lists