Andi Kleen wrote:
Probably. In principle getcpu() (where does the sched_ come from btw?)
getcpu() is an unacceptable name. All te other functions dealing with
CPU (sets, etc) have a sched_ prefix.
is only designed for the case where you don't set the affinity explicitely;
otherwise you should already know where you are and don't need it.
That's not true in general. Yes, because I want to test vgetcpu() I
restrict the set to just one CPU.
But if I have more than 2 "CPUs" and I set the affinity to two CPUs
which currently are not used you cannot make this argument.
getcpu should always work correctly not only if you cannot determine it
in another way.
Hmm ok one could probably define memset(..., 0) as a invalidation
interface, but because of the considerations above i don't think
it is really needed.
It is needed.
For now I added the cache clearing in the setaffinity calls in libc.
Resetting to cache to {0,0} seems to work.
--
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-
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]