mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: "Robert P. J. Day" <rpjday@crashcourse.ca>
Cc: andi@firstfloor.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] RWSEM: Rewrite rwsem.c and rwsem-spinlock.c more simply.
Date: Tue, 25 Mar 2008 12:14:38 -0700	[thread overview]
Message-ID: <20080325121438.883f7ceb.akpm@linux-foundation.org> (raw)
In-Reply-To: <alpine.LFD.1.00.0803250834220.19530@localhost.localdomain>

On Tue, 25 Mar 2008 08:42:48 -0400 (EDT)
"Robert P. J. Day" <rpjday@crashcourse.ca> wrote:

> On Tue, 25 Mar 2008, Andi Kleen wrote:
> 
> > > 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.
> 
>   ah, i think i see, thanks.  learn something every day.

A crude measyure is /usr/bin/size.  Your patch increased rwsem-spinlock.o
from 1595 bytes of text up to 1629.

A text size increase isn't necessarily always a bad thing, but it does need
to be monitored, understood, explained, etc.


      reply	other threads:[~2008-03-25 19:15 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
2008-03-25 12:42       ` Robert P. J. Day
2008-03-25 19:14         ` Andrew Morton [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=20080325121438.883f7ceb.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=andi@firstfloor.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