Re: [PATCH 3/3] cgroup/cpuset: Allow only one active attach operation per cpuset

From: Michal Koutný
Date: Tue Apr 04 2023 - 05:08:12 EST


Hi.

On Mon, Apr 03, 2023 at 01:41:33PM -0400, Waiman Long <longman@xxxxxxxxxx> wrote:
> This patch is actually not related to the CLONE_INTO_GROUP problem in patch
> 1. It is a generic problem when multiple users are moving threads into
> cgroup.threads of the same or different cpusets simultaneously.

I meant this:
__cgroup_procs_write
cgroup_kn_lock_live
mutex_lock(&cgroup_mutex)

and (more succintly)
cgroup_update_dfl_csses
lockdep_assert_held(&cgroup_mutex)

Even the threaded migrations should be synchronized here.
Can you please explain in more detail what's the problematic case?

> I don't believe this patch has a dependency on patch 1.

(I meant the opposite, patch 1 would depend in this 3/3. But maybe this
one isn't need.)

Michal

Attachment: signature.asc
Description: PGP signature