From: Cyril Hrubis <chrubis@suse.cz>
To: Martin Doucha <mdoucha@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] memcontrol03: Account for process size in cgroup allocation
Date: Fri, 9 May 2025 11:21:27 +0200 [thread overview]
Message-ID: <aB3JFz8PK2okhULz@yuki.lan> (raw)
In-Reply-To: <3ff8ee4c-881a-435d-a416-8bd32c35a17e@suse.cz>
Hi!
> > Here we depend on the fact that process memory has been properly
> > accounted for when it starts running its code. Are you sure that we can
> > rely on this or does this just happen to work?
>
> Actually, my commit message is slightly misleading because the existing
> process memory does not get migrated to the new cgroup. But the cgroup
> itself may already have non-zero memory usage even when empty, likely
> for internal kernel structures. Any new allocations of kernel structures
> should also be finished when the process migration completes. So unless
> the migration behavior changes in the near future, we can rely on this.
I suppose that the cgroup is charged for the memory it needs to track
the resources, that makes sense. I wonder if we can read that once at
the start of the test when we create the cgroups and use that value
later on.
> This sentence in the commit message:
> "Account for process size as reported by cgroup memory stats before..."
> should be changed to:
> "Account for existing cgroup memory usage before..."
That sounds better. I suppose that we can get this merged with this
change.
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2025-05-09 9:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-05 10:53 [LTP] [PATCH] memcontrol03: Account for process size in cgroup allocation Martin Doucha
2025-05-06 6:59 ` Li Wang via ltp
2025-05-07 14:23 ` Cyril Hrubis
2025-05-07 15:36 ` Martin Doucha
2025-05-09 9:21 ` Cyril Hrubis [this message]
2025-05-09 9:40 ` Martin Doucha
2025-05-09 10:01 ` Cyril Hrubis
2025-05-09 10:11 ` Martin Doucha
2025-05-20 15:29 ` Martin Doucha
[not found] ` <qbca5sxzfw53o6nku5ulu2dl2xygxqghgsuerjjjfoea62bacs@a5qm6cl7hhnu>
2025-05-09 14:41 ` Martin Doucha
2025-05-20 17:57 ` ALOK TIWARI via ltp
2025-05-26 13:52 ` Martin Doucha
[not found] ` <6msduqbs42k7lnysck7oxoqyicbo6yzktstxdjan5ktpv4qzrx@s2xpicy3johi>
2025-05-28 12:04 ` [LTP] [TEST PATCH] memcontrol: Wait for draining of remote stocks when charging Martin Doucha
2025-05-30 11:44 ` Martin Doucha
2025-07-03 9:36 ` Martin Doucha
2025-09-03 9:19 ` [LTP] [PATCH] memcontrol03: Account for process size in cgroup allocation Cyril Hrubis
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=aB3JFz8PK2okhULz@yuki.lan \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
--cc=mdoucha@suse.cz \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.