Re: 2.6.16 - sys_sched_getaffinity & hotplug

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

 



Paul Jackson wrote:
> Nathan wrote:
> > Which is problematic, because cpuset_cpus_allowed ->
> > guarantee_online_cpus restricts the task->cpus_allowed mask to cpus
> > which happen to be online at the time of the call to
> > sched_setaffinity.  If more cpus come online later, that task can't be
> > migrated to them.
> 
> Well, sort of.
> 
> A task could always migrate - just because a sched_getaffinity
> the task did in the past doesn't show a CPU as valid, doesn't stop
> the task from asking to pin to that CPU now.

I was speaking of the setaffinity (not getaffinity) case -- I assumed
this was what you were referring to since I couldn't find any calls to
the cpuset code in the getaffinity path.


> One of three lessons could be taken from your example:
>  1) return all possible CPUS (CPU_MASK_ALL, likely), as you
> recommend

I'm only recommending not changing the current behavior of
sched_getaffinity.

(BTW - cpu_possible_map can be a subset of CPU_MASK_ALL on some
platforms -- powerpc, at least, since we can discover the number of
truly possible cpus early in boot.)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux