public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
From: Torvald Riegel <triegel@redhat.com>
To: "Joseph S. Myers" <joseph@codesourcery.com>
Cc: Will Newton <will.newton@linaro.org>,
	       Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>,
	bniebuhr@efjohnson.com,        uclibc@uclibc.org,
	       "libc-ports@sourceware.org" <libc-ports@sourceware.org>,
	       libc-alpha <libc-alpha@sourceware.org>
Subject: Re: [PATCH] Fix __lll_timedlock_wait busy-wait issue
Date: Fri, 28 Mar 2014 18:25:00 -0000	[thread overview]
Message-ID: <1396031098.19076.3792.camel@triegel.csb> (raw)
In-Reply-To: <Pine.LNX.4.64.1403272157560.25264@digraph.polyomino.org.uk>

On Thu, 2014-03-27 at 22:01 +0000, Joseph S. Myers wrote:
> I don't know how this might relate to 
> <https://sourceware.org/bugzilla/show_bug.cgi?id=15119> (see 
> <https://sourceware.org/ml/libc-ports/2013-01/msg00084.html> and 
> <https://sourceware.org/ml/libc-ports/2013-02/msg00021.html> and the rest 
> of that thread).  But my preference for how to address this is definitely 
> to move to unifying lowlevellock.[ch] files across as many architectures 
> as possible - which requires someone to understand the differences and 
> produce a careful analysis that shows what the best form for generic files 
> is and what cases actually require architecture-specific files to override 
> those generic files (preferably overriding only the bits that need 
> overriding).
> 

I agree.  My gut feeling is that the locks should eventually become
unified C code, using atomics to do the synchronization;
architecture-specific code should be either in the atomics or in more
generally useful spin-waiting code (which could be used by other sync
constructs as well).  The futex syscall is really on the slowpath; if
you hit it, you will have had at least a cache miss on the futex var,
and doing the syscall will likely give you more cache misses.
Therefore, I don't see a reason why the futex syscall needs to have
custom asm implementations such as on x86 currently.

      parent reply	other threads:[~2014-03-28 18:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1395409800-4457-1-git-send-email-bniebuhr@efjohnson.com>
2014-03-27 20:31 ` Maxim Kuvyrkov
2014-03-27 20:54   ` Will Newton
2014-03-27 22:01     ` Joseph S. Myers
2014-03-27 22:14       ` Maxim Kuvyrkov
2014-03-27 22:19         ` Joseph S. Myers
2014-03-28 18:25       ` Torvald Riegel [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=1396031098.19076.3792.camel@triegel.csb \
    --to=triegel@redhat.com \
    --cc=bniebuhr@efjohnson.com \
    --cc=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    --cc=libc-ports@sourceware.org \
    --cc=maxim.kuvyrkov@linaro.org \
    --cc=uclibc@uclibc.org \
    --cc=will.newton@linaro.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).