linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Michal Koutný" <mkoutny@suse.com>
To: Guopeng Zhang <zhangguopeng@kylinos.cn>
Cc: tj@kernel.org, hannes@cmpxchg.org, mhocko@kernel.org,
	 roman.gushchin@linux.dev, shakeel.butt@linux.dev,
	muchun.song@linux.dev,  lance.yang@linux.dev, shuah@kernel.org,
	linux-mm@kvack.org,  linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] selftests: cgroup: make test_memcg_sock robust against delayed sock stats
Date: Thu, 4 Dec 2025 16:07:27 +0100	[thread overview]
Message-ID: <tjs4ai55xpqmmq3t7drwor44xz2vdcsjrpfbl2lnddxwnkqw6b@i5f3vknfxeg4> (raw)
In-Reply-To: <440f6a44-5d1a-44d6-b776-ec58e6c79f37@kylinos.cn>

[-- Attachment #1: Type: text/plain, Size: 816 bytes --]

On Wed, Dec 03, 2025 at 07:59:46PM +0800, Guopeng Zhang <zhangguopeng@kylinos.cn> wrote:
> In v5 I tried to follow that direction by introducing a generic helper
> function:
> 
>     cg_read_key_long_poll()
> 
> in cgroup_util.[ch]. This helper encapsulates the "poll with retries"
> logic and returns the final value, while leaving the actual assertion
> to the callers. Tests like test_memcg_sock() and test_kmem_dead_cgroups()
> then decide what condition they want to check (e.g. == 0, > 0, etc.),
> which seemed a bit more flexible and reusable for other cgroup stats.
> 
> Please let me know if you think this direction makes sense or if you have
> any further suggestions.

Thanks, I think this is ideal for the current tests. (I skimmed through
the v5 and I have no more remarks.)

Michal

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 265 bytes --]

      reply	other threads:[~2025-12-04 15:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-20  6:04 Guopeng Zhang
2025-11-20 15:35 ` Michal Koutný
2025-11-21  7:47   ` Guopeng Zhang
2025-12-03 11:59     ` Guopeng Zhang
2025-12-04 15:07       ` Michal Koutný [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=tjs4ai55xpqmmq3t7drwor44xz2vdcsjrpfbl2lnddxwnkqw6b@i5f3vknfxeg4 \
    --to=mkoutny@suse.com \
    --cc=hannes@cmpxchg.org \
    --cc=lance.yang@linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=muchun.song@linux.dev \
    --cc=roman.gushchin@linux.dev \
    --cc=shakeel.butt@linux.dev \
    --cc=shuah@kernel.org \
    --cc=tj@kernel.org \
    --cc=zhangguopeng@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