From: Bert Wesarg <wesarg@informatik.uni-halle.de>
To: Ulrich Drepper <drepper@redhat.com>
Cc: Andi Kleen <ak@suse.de>, Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: getcpu after sched_setaffinity
Date: Sat, 12 May 2007 12:16:32 +0200 [thread overview]
Message-ID: <46459400.1000900@informatik.uni-halle.de> (raw)
In-Reply-To: <46439BBA.2070705@redhat.com>
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 correct CPU.
>
> In set_cpus_allowed migrate_task() is called if the new CPU set does not
> include the current CPU. I hope that migrate_task() also works for
> p==current.
>
> This leaves the x86-64 vgetcpu() implementation as the weak point. Is
> the caching causing problems? Should migrate_task() make sure the cache
> is reset?
>
> You need a very recent glibc to compile (glibc-2.5.90-22 in rawhide).
> If this is not available replace the sched_getcpu() call. But make sure
> you pass a pointer to a cache.
>
>
A question not related to this problem, but may I ask why the libc don't
use[1] the linux/getcpu.h header to get the opaque struct vgetcpu_cache?
Thank You
Bert Wesarg
[1]: http://sourceware.org/ml/glibc-cvs/2007-q2/msg00098.html
prev parent reply other threads:[~2007-05-12 10:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-10 22:24 Ulrich Drepper
2007-05-10 23:44 ` Andi Kleen
2007-05-10 23:09 ` Ulrich Drepper
2007-05-11 7:08 ` Andi Kleen
2007-05-12 10:16 ` Bert Wesarg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46459400.1000900@informatik.uni-halle.de \
--to=wesarg@informatik.uni-halle.de \
--cc=ak@suse.de \
--cc=drepper@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®