mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: "Robert P. J. Day" <rpjday@crashcourse.ca>
Cc: Andi Kleen <andi@firstfloor.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH] RWSEM: Rewrite rwsem.c and rwsem-spinlock.c more simply.
Date: Tue, 25 Mar 2008 13:36:33 +0100	[thread overview]
Message-ID: <20080325123633.GL2170@one.firstfloor.org> (raw)
In-Reply-To: <alpine.LFD.1.00.0803250813190.19386@localhost.localdomain>

> i'm not sure what this means -- which of the transformations in that
> patch is considered unsafe?  here's a typical simplification:

It is not unsafe, just generates slight worse code.

current is inline assembler and the compiler doesn't know that it could
cache it in a register because it is not marked pure 
for various reasons. That is why current is often cached explicitely
in a local variable to tell the compiler that.

Before you run off and do that everywhere: it is also not a large
win, just a small one unless current is used very often.

-Andi

  reply	other threads:[~2008-03-25 12:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-25 11:02 Robert P. J. Day
2008-03-25 12:08 ` Andi Kleen
2008-03-25 12:27   ` Robert P. J. Day
2008-03-25 12:36     ` Andi Kleen [this message]
2008-03-25 12:42       ` Robert P. J. Day
2008-03-25 19:14         ` Andrew Morton

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=20080325123633.GL2170@one.firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rpjday@crashcourse.ca \
    /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

Powered by JetHome