Re: Patch: linux-2.5.29 __downgrade_write() for CONFIG_RWSEM_GENERIC_SPINLOCK

David Howells (dhowells@redhat.com)
Mon, 29 Jul 2002 10:13:55 +0100


> Roman Zippel <zippel@linux-m68k.org> wrote:
> > Did you look at the code? gcc should be able to optimize that itself.
>
> Maybe... gcc should also optimise my version to the same extent, I think
> (the result of one of the additional tests is known at compile time, and the
> other one is the same as the next test down). What I'm unsure about is how
> gcc will handle the variable being stored in memory not marked volatile and
> then retrieved again; whether it'll actually issue a read, or just assume
> it's got it cached.

It doesn't appear to make any difference which way it is done. The i386 code
from both looks the same.

David
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/