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

From: Roman Zippel (zippel@linux-m68k.org)
Date: Mon Jul 29 2002 - 06:42:38 EST


Hi,

On Mon, 29 Jul 2002, David Howells wrote:

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

Then I vote for the simpler version. :)
BTW even if gcc had problems optimizing that, I'd rather make it explicit,
that the two variables contain the same information:

        activity = sem->activity = 0;
        if (!list_empty(&sem->wait_list))
                sem = __rwsem_do_wake(sem, activity);

IMO that's more readable and will still work if gcc had to flush the
cached information before using it.

bye, Roman

-
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/



This archive was generated by hypermail 2b29 : Tue Jul 30 2002 - 14:00:32 EST