lkml.org 
[lkml]   [2006]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.6.16 - sys_sched_getaffinity & hotplug
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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-01-28 06:26    [W:0.037 / U:0.596 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site