mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@redhat.com>
To: Chuck Ebbert <76306.1226@compuserve.com>
Cc: Ingo Molnar <mingo@elte.hu>, Hugh Dickins <hugh@veritas.com>,
	Linus Torvalds <torvalds@osdl.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [patch] fix i386 mutex fastpath on FRAME_POINTER &&  !DEBUG_MUTEXES
Date: Wed, 11 Jan 2006 05:13:00 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.58.0601110511590.24014@devserv.devel.redhat.com> (raw)
In-Reply-To: <200601110327_MC3-1-B5A3-6E0E@compuserve.com>


On Wed, 11 Jan 2006, Chuck Ebbert wrote:

> In-Reply-To: <20060110210744.GA8850@elte.hu>
> 
> On Tue, 10 Jan 2006 at 22:07:44 +0100, Ingo Molnar wrote:
> 
> > --- linux.orig/include/asm-i386/mutex.h
> > +++ linux/include/asm-i386/mutex.h
> > @@ -28,7 +28,13 @@ do {                                                                       \
> >                                                                       \
> >       __asm__ __volatile__(                                           \
> >               LOCK    "   decl (%%eax)        \n"                     \
> > -                     "   js "#fail_fn"       \n"                     \
> > +                     "   js 2f               \n"                     \
> > +                     "1:                     \n"                     \
> > +                                                                     \
> > +             LOCK_SECTION_START("")                                  \
> > +                     "2: call "#fail_fn"     \n"                     \
> > +                     "   jmp 1b              \n"                     \
> > +             LOCK_SECTION_END                                        \
> >                                                                       \
> >               :"=a" (dummy)                                           \
> >               : "a" (count)                                           \
> 
> 
> But now it's inefficient again.
> 
> Why not this:
> 
>                 LOCK    "   decl (%%eax)        \n"                     \
>                         "   jns 1f              \n"                     \
>                         "   call "#fail_fn"     \n"                     \
>                         "1:                     \n"                     \
>                                                                         \
>                 :"=a" (dummy)                                           \
>                 : "a" (count)                                           \
> 
> 
> Will the extra taken forward conditional jump in the fastpath cause much
> of a slowdown?

yeah - the fastpath is much more common than the slowpath.

	Ingo

  reply	other threads:[~2006-01-11 10:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-11  8:24 Chuck Ebbert
2006-01-11 10:13 ` Ingo Molnar [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-01-12 17:53 Chuck Ebbert
2006-01-10 17:44 i386 FRAME_POINTER needs DEBUG_MUTEXES Hugh Dickins
2006-01-10 21:07 ` [patch] fix i386 mutex fastpath on FRAME_POINTER && !DEBUG_MUTEXES Ingo Molnar

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=Pine.LNX.4.58.0601110511590.24014@devserv.devel.redhat.com \
    --to=mingo@redhat.com \
    --cc=76306.1226@compuserve.com \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=torvalds@osdl.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®