From: Mike Galbraith <efault@gmx.de>
To: Thomas Pilarski <thomas.pi@arcor.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Andrew Morton <akpm@linux-foundation.org>,
Gregory Haskins <ghaskins@novell.com>,
bugme-daemon@bugzilla.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [Bugme-new] [Bug 12562] New: High overhead while switching or synchronizing threads on different cores
Date: Mon, 02 Feb 2009 09:52:11 +0100 [thread overview]
Message-ID: <1233564731.21378.9.camel@marge.simson.net> (raw)
In-Reply-To: <1233563600.3669.36.camel@localhost.localdomain>
On Mon, 2009-02-02 at 09:33 +0100, Thomas Pilarski wrote:
> Am Montag, den 02.02.2009, 09:19 +0100 schrieb Peter Zijlstra:
> > I suppose you'll have to go bug the glibc people about their random()
> > implementation.
>
> Yes, I will.
Finding the below was easy enough...
/* POSIX.1c requires that there is mutual exclusion for the `rand' and
`srand' functions to prevent concurrent calls from modifying common
data. */
__libc_lock_define_initialized (static, lock)
...
long int
__random ()
{
int32_t retval;
__libc_lock_lock (lock);
(void) __random_r (&unsafe_state, &retval);
__libc_lock_unlock (lock);
return retval;
}
...but finding the plumbing leading to __lll_lock_wait_private()
over-taxed my attention span.
-Mike
next prev parent reply other threads:[~2009-02-02 8:52 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-12562-10286@http.bugzilla.kernel.org/>
2009-01-28 20:56 ` [Bugme-new] [Bug 12562] New: High overhead while switching or synchronizing threads on different cores Andrew Morton
2009-01-28 22:15 ` Peter Zijlstra
2009-01-28 22:25 ` Thomas Pilarski
2009-01-29 9:07 ` Peter Zijlstra
2009-01-29 10:12 ` Thomas Pilarski
2009-01-29 10:24 ` Thomas Pilarski
2009-01-29 10:31 ` Peter Zijlstra
2009-01-29 11:37 ` Peter Zijlstra
2009-01-29 14:05 ` Thomas Pilarski
2009-01-30 7:57 ` Mike Galbraith
2009-02-02 7:43 ` Thomas Pilarski
2009-02-02 8:19 ` Peter Zijlstra
2009-02-02 8:33 ` Thomas Pilarski
2009-02-02 8:52 ` Mike Galbraith [this message]
2009-02-02 8:55 ` Peter Zijlstra
2009-02-02 12:15 ` Peter Zijlstra
2009-02-02 18:29 ` Michael Kerrisk
2009-02-02 18:35 ` Peter Zijlstra
2009-02-03 4:55 ` Mike Galbraith
2009-02-03 3:56 ` Valdis.Kletnieks
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=1233564731.21378.9.camel@marge.simson.net \
--to=efault@gmx.de \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=bugme-daemon@bugzilla.kernel.org \
--cc=ghaskins@novell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=thomas.pi@arcor.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.