Re: getcpu after sched_setaffinity

2007-05-12 Thread Bert Wesarg
Hello, (Please CC me, thank you) Ulrich Drepper wrote: > The attached test program fails on a dual core (and probably SMP) > machine on x86-64. Depending on where the thread starts, in one of the > iterations the sched_setffinity() call succeeds but then sched_getcpu() > fails to report the c

Re: getcpu after sched_setaffinity

2007-05-10 Thread Andi Kleen
On Thu, May 10, 2007 at 04:09:10PM -0700, Ulrich Drepper wrote: > >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

Re: getcpu after sched_setaffinity

2007-05-10 Thread Ulrich Drepper
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 sh

Re: getcpu after sched_setaffinity

2007-05-10 Thread Andi Kleen
On Thu, May 10, 2007 at 03:24:58PM -0700, Ulrich Drepper wrote: > The attached test program fails on a dual core (and probably SMP) > machine on x86-64. Depending on where the thread starts, in one of the > iterations the sched_setffinity() call succeeds but then sched_getcpu() > fails to repor