Skip to contentSkip to conversation

uses of cmpxchg/xadd in spinlock.h and rwsem.h vs. CONFIG_M386

DISCUSSION Jan Beulich 6 participants 9 messages May 12, 2009

lore
Share & tools
lore
#0 lore raw

While looking at a completely different issue I happened to grep for uses of xadd, and it would appear to me that there got uses added that would make a M386-configured SMP kernel die on an actual i386.

Oh, for the rwsem case I see - it would use the RWSEM_GENERIC_SPINLOCK case when selecting M386. But I see nothing similar for the ticket spinlocks - am I overlooking something?

Jan

#1 lore raw
Quoted 7 lines · Jan Beulich

While looking at a completely different issue I happened to grep for uses of xadd, and it would appear to me that there got uses added that would make a M386-configured SMP kernel die on an actual i386.

Oh, for the rwsem case I see - it would use the RWSEM_GENERIC_SPINLOCK case when selecting M386. But I see nothing similar for the ticket spinlocks - am I overlooking something?

Oh, hmm, we do actually attempt to support 386 SMP kernels... I thought that config wasn't allowed, but looking at the atomic.h code, it has ifdef fallbacks.

I guess some similar hacks could be added to spinlock.h code.

#2 lore raw
Quoted 3 lines

Oh, hmm, we do actually attempt to support 386 SMP kernels... I thought that config wasn't allowed, but looking at the atomic.h code, it has ifdef fallbacks.

We don't support running on SMP 386 hardware but we do in theory support running uniproc on it.

#3 lore raw
In reply to Nick Piggin
Quoted 9 lines · Nick Piggin
Quoted 7 lines · Jan Beulich

While looking at a completely different issue I happened to grep for uses of xadd, and it would appear to me that there got uses added that would make a M386-configured SMP kernel die on an actual i386.

Oh, for the rwsem case I see - it would use the RWSEM_GENERIC_SPINLOCK case when selecting M386. But I see nothing similar for the ticket spinlocks - am I overlooking something?

Quoted 5 lines

Oh, hmm, we do actually attempt to support 386 SMP kernels... I thought that config wasn't allowed, but looking at the atomic.h code, it has ifdef fallbacks.

I guess some similar hacks could be added to spinlock.h code.

Last time this came up I thought we decided i386-smp wasn't supported, and the Kconfig files ought to be adjusted.

#4 lore raw
In reply to Jan Beulich
Quoted 7 lines · Jan Beulich

While looking at a completely different issue I happened to grep for uses of xadd, and it would appear to me that there got uses added that would make a M386-configured SMP kernel die on an actual i386.

Oh, for the rwsem case I see - it would use the RWSEM_GENERIC_SPINLOCK case when selecting M386. But I see nothing similar for the ticket spinlocks - am I overlooking something?

It's quite possible we break 386 on a regular basis... I'm not sure how many people even in the embedded industry run current kernels on 386-compatible hardware. Most embedded hardware is at least 486.

-hpa

Signature · 2 lines
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.
#5 lore raw
Quoted 5 lines · H. Peter Anvin
Quoted 4 lines · Jan Beulich

While looking at a completely different issue I happened to grep for uses of xadd, and it would appear to me that there got uses added that would make a M386-configured SMP kernel die on an actual i386.

Quoted 7 lines
Quoted 3 lines

Oh, for the rwsem case I see - it would use the RWSEM_GENERIC_SPINLOCK case when selecting M386. But I see nothing similar for the ticket spinlocks - am I overlooking something?

It's quite possible we break 386 on a regular basis... I'm not sure how many people even in the embedded industry run current kernels on 386-compatible hardware. Most embedded hardware is at least 486.

Is it time to get rid of attempts to support SMP kernels that run on 386, then? Considering we don't actually support SMP 386, and if there is any 386 systems then they're going to be running custom kernels anyway.

#6 lore raw
Quoted 5 lines · Nick Piggin

Is it time to get rid of attempts to support SMP kernels that run on 386, then? Considering we don't actually support SMP 386, and if there is any 386 systems then they're going to be running custom kernels anyway.

Makes sense to me. We have never supported SMP 386 to the best of my knowledge, and a patch to rip that out would be appreciated.

-hpa

Signature · 2 lines
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.
#7 lore raw
Quoted 10 lines
Quoted 1 line
Quoted 1 line

"H. Peter Anvin" <[email protected]> 12.05.09 18:04 >>>

Quoted 5 lines · Nick Piggin

Is it time to get rid of attempts to support SMP kernels that run on 386, then? Considering we don't actually support SMP 386, and if there is any 386 systems then they're going to be running custom kernels anyway.

Makes sense to me. We have never supported SMP 386 to the best of my knowledge, and a patch to rip that out would be appreciated.

But why shouldn't a distro be allowed to configure a kernel that runs (UP) on i386 and also MP on modern systems?

Jan

#8 lore raw
In reply to Jan Beulich
Quoted 7 lines · Jan Beulich

While looking at a completely different issue I happened to grep for uses of xadd, and it would appear to me that there got uses added that would make a M386-configured SMP kernel die on an actual i386.

Oh, for the rwsem case I see - it would use the RWSEM_GENERIC_SPINLOCK case when selecting M386. But I see nothing similar for the ticket spinlocks - am I overlooking something?

This came up before, see
<http://marc.info/?l=linux-kernel&m=123141659309208&w=2>.

Andreas.

Signature · 3 lines
Andreas Schwab, [email protected]
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."