[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080325123633.GL2170@one.firstfloor.org>
Date: Tue, 25 Mar 2008 13:36:33 +0100
From: Andi Kleen <andi@...stfloor.org>
To: "Robert P. J. Day" <rpjday@...shcourse.ca>
Cc: Andi Kleen <andi@...stfloor.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...l.org>
Subject: Re: [PATCH] RWSEM: Rewrite rwsem.c and rwsem-spinlock.c more simply.
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists