linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] i386 rw_semaphores fix
@ 2001-04-10 19:42 Linus Torvalds
  2001-04-11 12:57 ` [PATCH] 2nd try: " David Howells
  0 siblings, 1 reply; 8+ messages in thread
From: Linus Torvalds @ 2001-04-10 19:42 UTC (permalink / raw)
  To: David Howells; +Cc: Andrew Morton, Ben LaHaise, Alan Cox, Kernel Mailing List



On Tue, 10 Apr 2001, David Howells wrote:
>
> Here's a patch that fixes RW semaphores on the i386 architecture. It is very
> simple in the way it works.

XADD only works on Pentium+.

That's no problem if we make this SMP-specific - I doubt anybody actually
uses SMP on i486's even if the machines exist, as I think they all had
special glue logic that Linux would have trouble with anyway. But the
advantages of being able to use one generic kernel that works on plain UP
i386 machines as well as SMP P6+ machines is big enough that I would want
to be able to say "CONFIG_X86_GENERIC" + "CONFIG_SMP".

Even if it would be noticeably slower (ie a fallback to a spinlock might
be perfectly ok).

If you do this, I woul dsuggest having asm-i386/{rwsem.h|rwsem-xadd.h},
and just having a

	#ifndef CONFIG_XADD
	#include <asm/rwsem.h>
	#else
	#include <asm/rwsem-xadd.h>
	#endif

(And adding "CONFIG_XADD" to the list of generated optimization
configuration options in arch/i386/config.in, of course).

That way we don't make the semaphore.h file even more unreadable.


		Linus



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2001-04-12  8:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <3AD45EC5.81EB82AD@akustik.rwth-aachen.de>
2001-04-11 14:17 ` [PATCH] 2nd try: i386 rw_semaphores fix David Howells
2001-04-11 14:32   ` Andreas Franck
2001-04-11 14:43     ` David Howells
2001-04-11 15:00       ` Andreas Franck
2001-04-11 15:14         ` Bernd Schmidt
2001-04-11 18:27           ` Linus Torvalds
2001-04-12  8:38             ` Jamie Lokier
2001-04-10 19:42 [PATCH] " Linus Torvalds
2001-04-11 12:57 ` [PATCH] 2nd try: " David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).