From: Nhat Pham <nphamcs@gmail.com>
To: Usama Arif <usamaarif642@gmail.com>
Cc: akpm@linux-foundation.org, hannes@cmpxchg.org,
shakeel.butt@linux.dev, david@redhat.com, ying.huang@intel.com,
hughd@google.com, willy@infradead.org, yosryahmed@google.com,
chengming.zhou@linux.dev, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, kernel-team@meta.com
Subject: Re: [PATCH v4 2/2] mm: remove code to handle same filled pages
Date: Wed, 12 Jun 2024 08:09:01 -0700 [thread overview]
Message-ID: <CAKEwX=Nh4hudrcqj5-a4FhE7kZRTKWZs0aq64b0KPnu3Dm=QaQ@mail.gmail.com> (raw)
In-Reply-To: <20240612124750.2220726-3-usamaarif642@gmail.com>
On Wed, Jun 12, 2024 at 5:47 AM Usama Arif <usamaarif642@gmail.com> wrote:
>
> With an earlier commit to handle zero-filled pages in swap directly,
> and with only 1% of the same-filled pages being non-zero, zswap no
> longer needs to handle same-filled pages and can just work on compressed
> pages.
>
> Signed-off-by: Usama Arif <usamaarif642@gmail.com>
> ---
> mm/zswap.c | 86 +++++-------------------------------------------------
> 1 file changed, 8 insertions(+), 78 deletions(-)
>
> diff --git a/mm/zswap.c b/mm/zswap.c
> index b9b35ef86d9b..ca8df9c99abf 100644
> --- a/mm/zswap.c
> +++ b/mm/zswap.c
> @@ -44,8 +44,6 @@
> **********************************/
> /* The number of compressed pages currently stored in zswap */
> atomic_t zswap_stored_pages = ATOMIC_INIT(0);
> -/* The number of same-value filled pages currently stored in zswap */
> -static atomic_t zswap_same_filled_pages = ATOMIC_INIT(0);
Can we re-introduce this counter somewhere? I have found this counter
to be valuable in the past, and would love to keep it. For instance,
in a system where a lot of zero-filled pages are reclaimed, we might
see an increase in swap usage. Having this counter at hands will allow
us to trace the source of the swap usage more easily. I *suppose* you
can do elimination work (check zswap usage, check disk swap usage
somehow - I'm not sure, etc., etc.), but this would be much more
direct and user-friendly.
Not *entirely* sure where to expose this though. Seems a bit specific
for vmstat. Maybe as a new debugfs directory?
This doesn't have to be done in this patch (or this series even) - but
please consider this for follow-up work at least :)
next prev parent reply other threads:[~2024-06-12 15:09 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-12 12:43 [PATCH v4 0/2] mm: store zero pages to be swapped out in a bitmap Usama Arif
2024-06-12 12:43 ` [PATCH v4 1/2] " Usama Arif
2024-06-12 20:13 ` Yosry Ahmed
2024-06-13 11:37 ` Usama Arif
2024-06-13 16:38 ` Yosry Ahmed
2024-06-13 19:21 ` Usama Arif
2024-06-13 19:26 ` Yosry Ahmed
2024-06-13 19:38 ` Usama Arif
2024-09-04 5:55 ` Barry Song
2024-09-04 7:12 ` Yosry Ahmed
2024-09-04 7:17 ` Barry Song
2024-09-04 7:22 ` Yosry Ahmed
2024-09-04 7:54 ` Barry Song
2024-09-04 17:40 ` Yosry Ahmed
2024-09-05 7:03 ` Barry Song
2024-09-05 7:55 ` Yosry Ahmed
2024-09-05 8:49 ` Barry Song
2024-09-05 10:10 ` Barry Song
2024-09-05 10:33 ` Barry Song
2024-09-05 10:53 ` Usama Arif
2024-09-05 11:00 ` Barry Song
2024-09-05 19:19 ` Usama Arif
2024-09-05 17:36 ` Yosry Ahmed
2024-09-05 19:28 ` Yosry Ahmed
2024-09-06 10:22 ` Barry Song
2024-09-05 10:37 ` Usama Arif
2024-09-05 10:42 ` Barry Song
2024-09-05 10:50 ` Usama Arif
2024-09-04 11:14 ` Usama Arif
2024-09-04 23:44 ` Barry Song
2024-09-04 23:47 ` Barry Song
2024-09-04 23:57 ` Yosry Ahmed
2024-09-05 0:29 ` Barry Song
2024-09-05 7:38 ` Yosry Ahmed
2024-06-12 12:43 ` [PATCH v4 2/2] mm: remove code to handle same filled pages Usama Arif
2024-06-12 15:09 ` Nhat Pham [this message]
2024-06-12 16:34 ` Usama Arif
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='CAKEwX=Nh4hudrcqj5-a4FhE7kZRTKWZs0aq64b0KPnu3Dm=QaQ@mail.gmail.com' \
--to=nphamcs@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=chengming.zhou@linux.dev \
--cc=david@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shakeel.butt@linux.dev \
--cc=usamaarif642@gmail.com \
--cc=willy@infradead.org \
--cc=ying.huang@intel.com \
--cc=yosryahmed@google.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