[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221031131140.GC27841@blackbody.suse.cz>
Date: Mon, 31 Oct 2022 14:11:40 +0100
From: Michal Koutný <mkoutny@...e.com>
To: Haifeng Xu <haifeng.xu@...pee.com>
Cc: tj@...nel.org, lizefan.x@...edance.com, hannes@...xchg.org,
cgroups@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] cgroup: Simplify code in css_set_move_task
Hello.
> 1) If calls 'css_set_update_populated' , the cset is either getting the
> first task or losing the last. There is a need to update the populated
> state of the cset only when 'css_set_populated' returns false.
> In other words, the last has been deleted from from_cset and the first
> hasn't been added to to_cset yet.
I've likely misread the condition previously. I see how this works now
(update happens after "from_cset" but before "to_cset" migration).
> 3) In order to update the populated state of to_cset the same way
> from_cset does, 'css_set_update_populated' is also invoked during the
> process of moving a task to to_cset.
As I think more about this in the context of vertical migrations
(ancestor<->descendant, such as during controller dis- or enablement),
I'm afraid the inverted order would lead to "spurious" emptiness
notifications in ancestors (in the case a there is just a single task
that migrates parent->child, parent/cgroup.populated would generate and
event that'd be nullified by the subsequent population of the child).
So I'm not sure the change is worth it.
Michal
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists