This is the mail archive of the
mailing list for the glibc project.
Re: [PATCHv2] powerpc: ABI change - add HWCAP/HWCAP2/platform info to TCB
- From: Steven Munroe <munroesj at linux dot vnet dot ibm dot com>
- To: Torvald Riegel <triegel at redhat dot com>
- Cc: "Carlos O'Donell" <carlos at redhat dot com>, Carlos Eduardo Seo <cseo at linux dot vnet dot ibm dot com>, GNU C Library <libc-alpha at sourceware dot org>, "Steven J. Munroe" <sjmunroe at us dot ibm dot com>, Tulio Machado <tuliom at linux dot vnet dot ibm dot com>
- Date: Thu, 27 Aug 2015 15:51:11 -0500
- Subject: Re: [PATCHv2] powerpc: ABI change - add HWCAP/HWCAP2/platform info to TCB
- Authentication-results: sourceware.org; auth=none
- References: <C6F0963E-DA8E-48B3-B6F6-8D6A4C399AED at linux dot vnet dot ibm dot com> <55DE2452 dot 1000907 at redhat dot com> <1440643271 dot 31963 dot 17 dot camel at oc7878010663> <1440643752 dot 3213 dot 4 dot camel at oc7878010663> <55DF11D0 dot 2090100 at redhat dot com> <1440706010 dot 11409 dot 14 dot camel at oc7878010663> <1440707166 dot 30828 dot 55 dot camel at localhost dot localdomain>
- Reply-to: munroesj at linux dot vnet dot ibm dot com
On Thu, 2015-08-27 at 22:26 +0200, Torvald Riegel wrote:
> On Thu, 2015-08-27 at 15:06 -0500, Steven Munroe wrote:
> > QED a Clone syscall is effectively a full barrier (Sequentially
> > Consistent) between stores in the thread parent and loads in the thread
> > child.
> Note that it would have to affect stores in the child too (ie, child
> stores overwrite parent stores that happened before the syscall), and
> loads in the parent shouldn't be able to read from stores in the child
> I guess that's the case because the OS should execute a full barrier on
> syscalls, and will use an acquire barrier or similar after getting the
> OK to start a new thread and before actually executing the thread?
That is all in the kernel code.
In this specific case only the parent (main()) thread will write the
static variables __tcb_hwcap, __tcb_platform and __tcb_hwcap_init,
before any children are created. And child threads will only read from
these variables (to copy to the TCB).
This is not the general cased for shared static storage and I make
specific claims beyond this case.