lkml.org 
[lkml]   [2022]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v5 3/3] cgroup/cpuset: Keep user set cpus affinity
From

On 8/16/22 18:19, Tejun Heo wrote:
> Hello,
>
> On Tue, Aug 16, 2022 at 06:11:03PM -0400, Waiman Long wrote:
>> It is hard to synchronize different subsystems atomically without running
>> into locking issue. Let me think about what can be done in this case.
> I have a hard time seeing why this would be particularly difficult. cpuset
> just needs to make the latest cpumask available to sched core in an easily
> accessible form and whenever that changes, trigger a set_cpus_allowed call.
> There's no need to entangle operations across the whole subsystems. All
> that's needed to be communicated is the current cpumask.
>
>> Is using a sequence number to check for race with retry good enough?
> It seems unnecessarily fragile and complicated to me. If we're gonna change
> it, let's change it right.

Thanks for the suggestion. I think I get what you want. I am going to
migrate the cpuset_set_cpus_allowed_ptr() logic into
set_cpus_allowed_ptr() itself. IOW, if user_cpus_ptr is defined, it will
be an additional mask to be applied on top. It does affect all callers
of set_cpus_allowed_ptr() though. I am going to drop this cpuset
specific patch.

BTW, I will be on PTO starting tomorrow until next Tuesday. So I will be
slow in responding to emails.

Cheers,
Longman

Cheers,
Longman

\
 
 \ /
  Last update: 2022-08-17 02:15    [W:0.076 / U:0.876 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site