From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: 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,
Sergey Senozhatsky <senozhatsky@chromium.org>
Subject: Re: [PATCH v2] zram: keep the hot statistics per CPU
Date: Sun, 6 Dec 2026 14:35:47 +0900 [thread overview]
Message-ID: <axTz9ORI72HJ34d-@google.com> (raw)
In-Reply-To: <20261206052927.2499698-1-senozhatsky@chromium.org>
On (26/12/06 14:29), 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>
Andrew, can you please replace 25-new.git/tree/patches/zram-keep-the-hot-statistics-per-cpu.patch
with this patch?
prev parent reply other threads:[~2026-12-06 5:35 UTC|newest]
Thread overview: 2+ 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 [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=axTz9ORI72HJ34d-@google.com \
--to=senozhatsky@chromium.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 \
/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