linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Yosry Ahmed <yosryahmed@google.com>
To: Chengming Zhou <zhouchengming@bytedance.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	 Nhat Pham <nphamcs@gmail.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] mm/zswap: change zswap_pool kref to percpu_ref
Date: Mon, 12 Feb 2024 14:42:09 -0800	[thread overview]
Message-ID: <CAJD7tkYdEWrrQj+MFNpDR6FHc60czXcuawh3dd1rSF=QQm6+yg@mail.gmail.com> (raw)
In-Reply-To: <20240210-zswap-global-lru-v1-2-853473d7b0da@bytedance.com>

On Sun, Feb 11, 2024 at 5:58 AM Chengming Zhou
<zhouchengming@bytedance.com> wrote:
>
> All zswap entries will take a reference of zswap_pool when
> zswap_store(), and drop it when free. Change it to use the
> percpu_ref is better for scalability performance.
>
> Testing kernel build in tmpfs with memory.max=2GB
> (zswap shrinker and writeback enabled with one 50GB swapfile).
>
>         mm-unstable  zswap-global-lru
> real    63.20        63.12
> user    1061.75      1062.95
> sys     268.74       264.44

Are these numbers from a single run or the average of multiple runs?
It just seems that the improvement is small, and percpu refcnt is
slightly less intuitive (and uses a bit more memory), so let's make
sure there is a real performance gain first.

It would also be useful to mention how many threads/CPUs are being used here.


  parent reply	other threads:[~2024-02-12 22:42 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-11 13:57 [PATCH 0/2] mm/zswap: optimize for dynamic zswap_pools Chengming Zhou
2024-02-11 13:57 ` [PATCH 1/2] mm/zswap: global lru and shrinker shared by all zswap_pools Chengming Zhou
2024-02-11 19:01   ` kernel test robot
2024-02-12 13:17     ` Chengming Zhou
2024-02-11 21:04   ` Nhat Pham
2024-02-12 13:20     ` Chengming Zhou
2024-02-11 22:05   ` kernel test robot
2024-02-13 12:57   ` Yosry Ahmed
2024-02-13 14:20     ` Chengming Zhou
2024-02-13 17:43       ` Yosry Ahmed
2024-02-11 13:57 ` [PATCH 2/2] mm/zswap: change zswap_pool kref to percpu_ref Chengming Zhou
2024-02-11 21:21   ` Nhat Pham
2024-02-12 13:29     ` Chengming Zhou
2024-02-12 18:53       ` Nhat Pham
2024-02-13 14:22         ` Chengming Zhou
2024-02-12 22:42   ` Yosry Ahmed [this message]
2024-02-13 14:31     ` Chengming Zhou
2024-02-13 17:45       ` Yosry Ahmed

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='CAJD7tkYdEWrrQj+MFNpDR6FHc60czXcuawh3dd1rSF=QQm6+yg@mail.gmail.com' \
    --to=yosryahmed@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nphamcs@gmail.com \
    --cc=zhouchengming@bytedance.com \
    /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