public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Li Wang <liwang@redhat.com>
To: Yosry Ahmed <yosryahmed@google.com>
Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	akpm@linux-foundation.org, "Johannes Weiner" <hannes@cmpxchg.org>,
	"Michal Hocko" <mhocko@kernel.org>,
	"Michal Koutný" <mkoutny@suse.com>,
	"Muchun Song" <muchun.song@linux.dev>,
	"Nhat Pham" <nphamcs@gmail.com>, "Tejun Heo" <tj@kernel.org>,
	"Roman Gushchin" <roman.gushchin@linux.dev>,
	"Shakeel Butt" <shakeel.butt@linux.dev>
Subject: Re: [PATCH 4/5] selftest/cgroup: fix zswap test_no_invasive_cgroup_shrink on 64K pagesize system
Date: Thu, 12 Mar 2026 10:36:42 +0800	[thread overview]
Message-ID: <abImuvCrv9uDXVc-@redhat.com> (raw)
In-Reply-To: <CAJD7tkawFFwiV72S5eJfmqaH63k+kisMNLPrc8-u-9taGRanCQ@mail.gmail.com>

On Wed, Mar 11, 2026 at 12:01:24PM -0700, Yosry Ahmed wrote:
> On Wed, Mar 11, 2026 at 4:06 AM Li Wang <liwang@redhat.com> wrote:
> >
> > The test_no_invasive_cgroup_shrink and allocate_bytes use a hardcoded
> > stride of 4095 bytes when touching allocated pages. On systems with 64K
> > page size, this results in writing to the same page multiple times
> > instead of touching all pages, leading to insufficient memory pressure.
> >
> > Additionally, the original memory limits and allocation sizes are too
> > small for 64K page size systems. With only 1M memory.max, there are
> > very few pages available, and a zswap.max of 10K may not provide enough
> > room to store even a single compressed page. This can cause OOM kills
> > or false positives due to insufficient zswap writeback being triggered.
> >
> > Fix these issues by:
> > - Using sysconf(_SC_PAGESIZE) instead of the hardcoded 4095 stride in
> >   both allocate_bytes() and test_no_invasive_cgroup_shrink().
> 
> AFAICT there are other instances of hardcoded 4095 and 4096 values in
> the test, do you mind having a separate patch that updates all of them
> to the runtime value?

Good point, I will achive it in patch V2. Thanks!

-- 
Regards,
Li Wang


  reply	other threads:[~2026-03-12  2:36 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-11 11:05 [PATCH 1/5] selftests/cgroup: detect and handle global zswap state in test_zswap Li Wang
2026-03-11 11:05 ` [PATCH 2/5] selftests/cgroup: avoid OOM in test_swapin_nozswap Li Wang
2026-03-11 18:50   ` Yosry Ahmed
2026-03-12  4:01     ` Li Wang
2026-03-12 17:09       ` Nhat Pham
2026-03-13  2:59         ` Li Wang
2026-03-11 11:05 ` [PATCH 3/5] selftests/cgroup: use runtime page size for zswpin check Li Wang
2026-03-11 18:56   ` Yosry Ahmed
2026-03-12  2:35     ` Li Wang
2026-03-11 11:05 ` [PATCH 4/5] selftest/cgroup: fix zswap test_no_invasive_cgroup_shrink on 64K pagesize system Li Wang
2026-03-11 19:01   ` Yosry Ahmed
2026-03-12  2:36     ` Li Wang [this message]
2026-03-11 11:05 ` [PATCH 5/5] selftest/cgroup: fix zswap attempt_writeback() " Li Wang
2026-03-11 18:58   ` Yosry Ahmed
2026-03-12  2:38     ` Li Wang
2026-03-11 13:20 ` [PATCH 1/5] selftests/cgroup: detect and handle global zswap state in test_zswap Michal Koutný
2026-03-11 18:41   ` Yosry Ahmed
2026-03-11 18:47 ` Yosry Ahmed
2026-03-12  1:41   ` Li Wang

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=abImuvCrv9uDXVc-@redhat.com \
    --to=liwang@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mhocko@kernel.org \
    --cc=mkoutny@suse.com \
    --cc=muchun.song@linux.dev \
    --cc=nphamcs@gmail.com \
    --cc=roman.gushchin@linux.dev \
    --cc=shakeel.butt@linux.dev \
    --cc=tj@kernel.org \
    --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