Re: [PATCH v3 07/14] sched: Introduce restrict_cpus_allowed_ptr() to limit task CPU affinity

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 19, 2020 at 01:13:20PM +0000, Will Deacon wrote:

> 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.

# for i in /sys/devices/system/cpu/cpu*/online; do echo -n $i ":"; cat $i; done
/sys/devices/system/cpu/cpu1/online :0
/sys/devices/system/cpu/cpu2/online :1
/sys/devices/system/cpu/cpu3/online :1
/sys/devices/system/cpu/cpu4/online :1
/sys/devices/system/cpu/cpu5/online :1
/sys/devices/system/cpu/cpu6/online :1
/sys/devices/system/cpu/cpu7/online :1

# grep Cpus_allowed /proc/self/status
Cpus_allowed:   ff
Cpus_allowed_list:      0-7


:-)



[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux