public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Michal Hocko via ltp <ltp@lists.linux.it>
To: Harshvardhan Jha <harshvardhan.j.jha@oracle.com>
Cc: ltp@lists.linux.it, cgroups@vger.kernel.org
Subject: Re: [LTP] Issue faced in memcg_stat_rss while running mainline kernels between 6.7 and 6.8
Date: Thu, 16 Jan 2025 11:35:54 +0100	[thread overview]
Message-ID: <Z4jhCpFLe_Xgxlnl@tiehlicka> (raw)
In-Reply-To: <4b9e0d85-7a75-426a-86fe-faf6107a3692@oracle.com>

On Thu 16-01-25 15:34:38, Harshvardhan Jha wrote:
> Hi Michal,
> 
> On 16/01/25 2:36 PM, Michal Hocko wrote:
> > On Thu 16-01-25 13:37:14, Harshvardhan Jha wrote:
> >> Hello Michal
> >> On 16/01/25 1:23 PM, Michal Hocko wrote:
> >>> Hi,
> >>>
> >>> On Wed 15-01-25 23:59:20, Petr Vorel wrote:
> >>>> Hi Harshvardhan,
> >>>>
> >>>> [ Cc cgroups@vger.kernel.org: FYI problem in recent kernel using cgroup v1 ]
> >>> It is hard to decypher the output and nail down actual failure. Could
> >>> somebody do a TL;DR summary of the failure, since when it happens, is it
> >>> really v1 specific?
> >> The test ltp_memcg_stat_rss is indeed cgroup v1 specific.
> > What does this test case aims to test?
> >
> This test specifically tests the memory cgroup(memcg) subsystem,
> focusing on the RSS accounting functionality.
> 
> The test verifies how the kernel tracks and reports memory usage within
> cgroups, specifically:
> 
> - The accuracy of RSS accounting in memory cgroups
> - How the kernel updates and maintains the RSS statistics for processes
> within memory cgroups
> - The proper reporting of memory usage through the cgroup interface
> 
> The test typically:
> 
>  1. Creates a memory cgroup
>  2. Allocates various types of memory within it
>  3. Verifies that the reported RSS statistics match the expected values
>  4. Test edge cases like shared pages and memory pressure situations
> 
> I hope I explained it right @Petr?

Thanks. Yes this does clarify the test case. Unfortunatelly this could
be quite tricky to get right, especially on short lived processes. Due
to stats accounting optimizations all the changes to counters might not be
visible right a way. So there is some tuning required and to make it
worse that tuning might just not work with future optimizations.

All that being said, it is a question whether the specific testcases
brings a sufficient value to justify likely false negatives and constant
tuning to existing kenrnel implementation.

If this local imprecision is a problem for real workloads we might need
to provide means to sync up stats (similar to what we have for
/proc/vmstat) and test cases could rely on that rather than trying to
estimate in flight cached stats.
-- 
Michal Hocko
SUSE Labs

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2025-01-16 10:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-19  8:25 [LTP] Issue faced in memcg_stat_rss while running mainline kernels between 6.7 and 6.8 Harshvardhan Jha via ltp
2024-12-05  6:48 ` Harshvardhan Jha via ltp
2025-01-15 12:52   ` Petr Vorel
2025-01-15 22:59     ` Petr Vorel
2025-01-16  7:53       ` Michal Hocko via ltp
2025-01-16  8:07         ` Harshvardhan Jha via ltp
2025-01-16  9:06           ` Michal Hocko via ltp
2025-01-16 10:04             ` Harshvardhan Jha via ltp
2025-01-16 10:35               ` Michal Hocko via ltp [this message]
2025-01-16 10:12             ` Petr Vorel
  -- strict thread matches above, loose matches on Subject: below --
2024-11-25 16:56 Harshvardhan Jha via ltp

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=Z4jhCpFLe_Xgxlnl@tiehlicka \
    --to=ltp@lists.linux.it \
    --cc=cgroups@vger.kernel.org \
    --cc=harshvardhan.j.jha@oracle.com \
    --cc=mhocko@suse.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