Re: [PATCH v1 -next 2/3] cgroup/freezer: Reduce redundant propagation for cgroup_propagate_frozen

From: Michal Koutný
Date: Tue Sep 10 2024 - 07:33:21 EST


On Tue, Sep 10, 2024 at 11:08:12AM GMT, Chen Ridong <chenridong@xxxxxxxxxxxxxxx> wrote:
> > This should be correct also wrt cgroup creation and removal.
> >
> Before calling cgroup_freeze, cgroup_freeze_write have hold the
> cgroup_mutex, could parent's nr_frozen_descendants be changed?

Sorry for ambigious wording, I meant that the code you posted appears
to me to be correct (and safe) wrt cgroup tree operations -- thanks to
css_set_lock because frozen bookkeeping is under it (cgroup_mutex would
be too heavy weight for all possible callers of
cgroup_propagate_frozen(), namely cgroup_enter_frozen).

Or do you suggest the current form would need cgroup_mutex
synchronization somehow?

Michal

Attachment: signature.asc
Description: PGP signature