Linux block layer
 help / color / mirror / Atom feed
From: Weijie Yuan <wy@wyuan.org>
To: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Hongfeng Chen <hongfengchen@xiaomi.com>,
	Barry Song <baohua@kernel.org>, Minchan Kim <minchan@kernel.org>,
	linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
	linux-mm@kvack.org
Subject: Re: [PATCH v2] zram: keep the hot statistics per CPU
Date: Sun, 6 Dec 2026 16:05:58 +0800	[thread overview]
Message-ID: <axUXZhHSrWy9BF2i@wyuan.org> (raw)
In-Reply-To: <20261206052927.2499698-1-senozhatsky@chromium.org>

On Sun, Dec 06, 2026 at 02:29:06PM +0900, Sergey Senozhatsky wrote:
> When several processes free swapped out memory at the same time, e.g.  on
> munmap() or exit, all CPUs update pages_stored, compr_data_size,
> same_pages, huge_pages, huge_pages_since and notify_free stats, so the
> cachelines bounce a lot [1].  Keep the six counters per CPU instead, as
> s64 + u64_stats_sync updated with preemption disabled.
> 
> munmap() test:
>                   before     after
>   4 x 256 MiB     18.69 ms   14.12 ms   (-24%)
>   8 x 128 MiB     14.82 ms   10.09 ms   (-32%)
> 
> Link: https://patch.msgid.link/20261123054746.2579253-3-senozhatsky@chromium.org
> Link: https://lore.kernel.org/20261017031542.3504947-1-hongfengchen@xiaomi.com [1]
> Signed-off-by: Hongfeng Chen <hongfengchen@xiaomi.com>
> Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
> Co-developed-by: Hongfeng Chen <hongfengchen@xiaomi.com>
> ---

Just a drive-by nit: SubmittingPatches asks to move Hongfeng's
Co-developed-by line right above his Signed-off-by.

https://docs.kernel.org/process/submitting-patches.html#when-to-use-acked-by-cc-and-co-developed-by

Thanks.

>  drivers/block/zram/zram_drv.c | 116 ++++++++++++++++++++++++++--------
>  drivers/block/zram/zram_drv.h |  27 ++++++--
>  2 files changed, 110 insertions(+), 33 deletions(-)

      parent reply	other threads:[~2026-12-06  8:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20261124001128.7408D1F000C6@smtp.kernel.org>
2026-12-06  5:29 ` [PATCH v2] zram: keep the hot statistics per CPU Sergey Senozhatsky
2026-12-06  5:35   ` Sergey Senozhatsky
2026-12-06  6:53   ` Barry Song
2026-12-06  7:16     ` Sergey Senozhatsky
2026-12-06  8:05   ` Weijie Yuan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=axUXZhHSrWy9BF2i@wyuan.org \
    --to=wy@wyuan.org \
    --cc=akpm@linux-foundation.org \
    --cc=baohua@kernel.org \
    --cc=hongfengchen@xiaomi.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=senozhatsky@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox