From: no-reply@sashiko.virtuozzo.com
To: Konstantin Khorenko <khorenko@virtuozzo.com>, devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.1 2/2] ms/selftests: cgroup: make test_memcg_sock check flushed sock stats
Date: Mon, 19 Oct 2026 19:50:39 +0000 [thread overview]
Message-ID: <010701a155b7518c-bdf9c6f3-ef6e-4595-afa1-06eb74b68f1b-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261019-b4-prep-khorenko-vstor-149854-selftests-test_memcg_sock-v1-2-efbfa45dc967@virtuozzo.com>
> test_memcg_sock compares memory.current with the "sock " entry of
> memory.stat. memory.current changes at charge time, "sock " only when
> the memcg stats are flushed: by a memory.stat read once enough updates
> are pending (MEMCG_CHARGE_BATCH per online CPU), or by a periodic,
> deferrable worker. Nothing in the test makes sure a flush happens:
>
> - tcp_client() takes 16 readings right after connect(). If no flush
> lands among them, "sock " reads 0, and the test either passes on
> 0 == 0 without checking anything or, once memory.current shows the
> first charge, cannot pass any more and fails:
>
> not ok 11 test_memcg_sock
>
> - The final check waits 3 seconds for "sock " to drop to 0, counting on
> the deferrable worker, which can run later than that on an idle
> [ ... ]
>
> https://virtuozzo.atlassian.net/browse/VSTOR-149854
>
> Feature: fix selftests
> Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261019-b4-prep-khorenko-vstor-149854-selftests-test_memcg_sock-v1-0-efbfa45dc967@virtuozzo.com?part=2
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-10-19 19:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-19 19:47 [Devel] [PATCH hci-8.1 0/2] selftests: cgroup: fix the flaky and vacuous test_memcg_sock Konstantin Khorenko
2026-10-19 19:47 ` [Devel] [PATCH hci-8.1 1/2] ms/selftests: cgroup: skip test_memcg_sock under cgroup.memory=nosocket Konstantin Khorenko
2026-10-19 19:50 ` no-reply
2026-10-19 19:47 ` [Devel] [PATCH hci-8.1 2/2] ms/selftests: cgroup: make test_memcg_sock check flushed sock stats Konstantin Khorenko
2026-10-19 19:50 ` no-reply [this message]
2026-10-19 19:59 ` [Devel] [PATCH hci-8.1 0/2] selftests: cgroup: fix the flaky and vacuous test_memcg_sock Konstantin Khorenko
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=010701a155b7518c-bdf9c6f3-ef6e-4595-afa1-06eb74b68f1b-000000@eu-central-1.amazonses.com \
--to=no-reply@sashiko.virtuozzo.com \
--cc=devel@openvz.org \
--cc=khorenko@virtuozzo.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