mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kurt Lin <lylin1023@gmail.com>
To: Hui Zhu <hui.zhu@linux.dev>
Cc: Hui Zhu <zhuhui@kylinos.cn>,
	Kumar Kartikeya Dwivedi <memxor@gmail.com>,
	bpf@vger.kernel.org, Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	Eduard Zingerman <eddyz87@gmail.com>, Song Liu <song@kernel.org>,
	Yonghong Song <yonghong.song@linux.dev>,
	Jiri Olsa <jolsa@kernel.org>,
	Ihor Solodrai <ihor.solodrai@linux.dev>,
	Emil Tsalapatis <emil@etsalapatis.com>,
	Barry Song <baohua@kernel.org>, Shuah Khan <shuah@kernel.org>,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	Kurt Lin <lylin1023@gmail.com>
Subject: Re: [PATCH bpf-next] selftests/bpf: Skip memcg_proactive_reclaim when data lands in shmem
Date: Tue, 17 Nov 2026 01:14:30 +0800	[thread overview]
Message-ID: <20261116171430.1008098-1-lylin1023@gmail.com> (raw)
In-Reply-To: <bbb07259-a2e8-40b5-9933-eb3d5d7a4bba@linux.dev>

Hi Hui,

Thanks for the review.

On 2026/11/16 11:04, Hui Zhu wrote:
> Would it make sense to turn the silent "return false" into an explicit
> assertion, e.g.:
>
>      if (!ASSERT_OK(read_cgroup_file(CG_PATH, "memory.stat", buf,
>                      sizeof(buf)), "read memory.stat"))
>          return false;

Agreed, a read or parse failure will fail the test in v2.

> Small nit: a one-line comment on the threshold might help future
> readers, something like "all-or-nothing: the data file is either fully
> shmem (stacked tmpfs) or not shmem at all (disk-backed), so half of
> FILE_SIZE is a safe midpoint". Also, printing the measured shmem value
> in the SKIP message could be handy when debugging odd environments.

Will do both.

v2 will also address two points sashiko raised: memory.stat is not
force-flushed, so right after the write it can still read 0 on machines
with many CPUs, and a shmem-backed /tmp should fall back to "." instead
of skipping. I plan to poll memory.stat until the write shows up and to
try each candidate directory in a cgroup of its own.

Thanks,
Kurt

      reply	other threads:[~2026-11-16 17:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-13 18:01 Kurt Lin
2026-11-16  3:04 ` Hui Zhu
2026-11-16 17:14   ` Kurt Lin [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=20261116171430.1008098-1-lylin1023@gmail.com \
    --to=lylin1023@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=baohua@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=emil@etsalapatis.com \
    --cc=hui.zhu@linux.dev \
    --cc=ihor.solodrai@linux.dev \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=memxor@gmail.com \
    --cc=shuah@kernel.org \
    --cc=song@kernel.org \
    --cc=yonghong.song@linux.dev \
    --cc=zhuhui@kylinos.cn \
    /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

all inboxes | Powered by JetHome®