This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add PTHREAD_MUTEX_NORMAL_INT


On Wed, 2013-06-26 at 07:59 -0700, Andi Kleen wrote:
> > I really get the impression you're not reading reviews.  At least you
> > seem to be ignoring mine.  Have a look at my reply to your top-most
> > email in the v10 patch set:
> > http://sourceware.org/ml/libc-alpha/2013-06/msg00500.html
> > Look at point 2).  There's 4 paragraphs just about this.
> 
> You're basically saying I should have separate lock types instead
> of flags.

No, I'm not.  First, I said that *if* you want to add new lock types,
you should target the C++11 semantics.  That doesn't mean that we do add
new lock types now.  Second, performance hints don't require new
semantics (ie, new types); I said that any elision flags that we might
have should be performance hints (ie, don't change semantics).  That
still doesn't say that we have consensus for any interface for making
per-lock performance hints.

> As for HLE vs RTM semantics, I consider nested trylock undefined
> with elision.

I don't understand this sentence.  Undefined from which/whose point of
view?

> So whether it acts like HLE and RTM is undefined.

Do you mean "HLE *or* RTM"?  What does "it" refer to?

> In terms of hardware HLE will never nest as deeply as RTM can,
> because each nesting level needs hardware resources (a lock buffer)
> So it's unlikely HLE will ever nest as deep as RTM can.

So?  Maybe HLE won't work for long chains of hand-over-hand locking, but
it would be reasonable to assume that it works for a few nested critical
sections, right?




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]