Re: [PATCH] cgroup/cpuset: update parent subparts cpumask while holding css refcnt

From: Michal Koutný
Date: Mon Jul 10 2023 - 11:54:55 EST


On Mon, Jul 10, 2023 at 11:40:36AM -0400, Waiman Long <longman@xxxxxxxxxx> wrote:
> I believe the primary reason is because update_parent_subparts_cpumask() can
> potential run for quite a while. So we don't want to hold the rcu_read_lock
> for too long.

But holding cpuset_mutex is even worse than rcu_read_lock()? IOW is the
relieve with this reason worth it?

> There may also be a potential that schedule() may be called.

Do you mean the spinlocks with PREEMPT_RT or anything else? (That seems
like the actual reason IIUC.)

Thanks,
Michal

Attachment: signature.asc
Description: PGP signature