Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1400538
| From | Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] zram: introduce per-device debug_stat sysfs node |
| Date | 2016-05-13 09:00 +0200 |
| Message-ID | <ryfeN-6kr-5@gated-at.bofh.it> (permalink) |
| References | <rxBKs-8nL-41@gated-at.bofh.it> <ry8wH-81C-11@gated-at.bofh.it> <ry9M5-XI-7@gated-at.bofh.it> <ryeLR-66n-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH] zram: introduce per-device debug_stat sysfs node Minchan Kim <minchan@kernel.org> - 2016-05-13 01:50 +0200
Re: [PATCH] zram: introduce per-device debug_stat sysfs node Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-05-13 03:10 +0200
Re: [PATCH] zram: introduce per-device debug_stat sysfs node Minchan Kim <minchan@kernel.org> - 2016-05-13 08:30 +0200
Re: [PATCH] zram: introduce per-device debug_stat sysfs node Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-05-13 09:00 +0200
Re: [PATCH] zram: introduce per-device debug_stat sysfs node Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-05-13 09:10 +0200
Re: [PATCH] zram: introduce per-device debug_stat sysfs node Minchan Kim <minchan@kernel.org> - 2016-05-13 09:20 +0200
Re: [PATCH] zram: introduce per-device debug_stat sysfs node Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-05-13 09:40 +0200
Re: [PATCH] zram: introduce per-device debug_stat sysfs node Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-05-13 10:10 +0200
Re: [PATCH] zram: introduce per-device debug_stat sysfs node Minchan Kim <minchan@kernel.org> - 2016-05-14 01:10 +0200
Re: [PATCH] zram: introduce per-device debug_stat sysfs node Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-05-14 04:40 +0200
csiph-web