lkml.org 
[lkml]   [2020]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v3 07/14] sched: Introduce restrict_cpus_allowed_ptr() to limit task CPU affinity
Date

On 19/11/20 13:13, Will Deacon wrote:
> On Thu, Nov 19, 2020 at 12:47:34PM +0000, Valentin Schneider wrote:
>>
>> On 13/11/20 09:37, Will Deacon wrote:
>> > Asymmetric systems may not offer the same level of userspace ISA support
>> > across all CPUs, meaning that some applications cannot be executed by
>> > some CPUs. As a concrete example, upcoming arm64 big.LITTLE designs do
>> > not feature support for 32-bit applications on both clusters.
>> >
>> > Although userspace can carefully manage the affinity masks for such
>> > tasks, one place where it is particularly problematic is execve()
>> > because the CPU on which the execve() is occurring may be incompatible
>> > with the new application image. In such a situation, it is desirable to
>> > restrict the affinity mask of the task and ensure that the new image is
>> > entered on a compatible CPU.
>>
>> > From userspace's point of view, this looks the same as if the
>> > incompatible CPUs have been hotplugged off in its affinity mask.
>>
>> {pedantic reading warning}
>>
>> Hotplugged CPUs *can* be set in a task's affinity mask, though interact
>> weirdly with cpusets [1]. Having it be the same as hotplug would mean
>> keeping incompatible CPUs allowed in the affinity mask, but preventing them
>> from being picked via e.g. is_cpu_allowed().
>
> Sure, but I was talking about what userspace sees, and I don't think it ever
> sees CPUs that have been hotplugged off, right? That is, sched_getaffinity()
> masks its result with the active_mask.
>

Right, this wasn't pedantic reading, but reading between the lines!

\
 
 \ /
  Last update: 2020-11-19 15:56    [W:0.287 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site