Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 42437 - SMP code requires 2+ processors?
Summary: SMP code requires 2+ processors?
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: Lowest blocker (vote)
Assignee: x86-kernel@gentoo.org (DEPRECATED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-21 19:14 UTC by Ed Grimm
Modified: 2004-03-25 15:08 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Grimm 2004-02-21 19:14:23 UTC
gentoo-dev-sources-2.6.3 requires the maximum number of CPUs (an SMP config) to be no less than 2.

From a developmental perspective, having different code for multiprocessor machines and single processor machines is a handicap.  While there is some SMP code which is completely useless on a single processor box, the last I checked, there were substantial portions of code marked as SMP which were, in fact, useful on both uniprocessor machines and multiprocessor machines, and people were being told that the only good reason to use the non-SMP version was that the SMP version didn't work with ones hardware.

This is a minor issue, as it's only the maximum number, not the required number.  However, it makes the statement, "We don't want you uni-processor freaks to run SMP."  As such, it almost certainly reduces the number of people using the SMP version of the kernel on uni-processor, and therefore reduces the amount of use this configuration gets.  As such, it blocks the merging of the mergable code between SMP and non-SMP.

Most likely, this is a LKML issue.  However, as I'm looking at highly patched kernel sources, I felt it was more appropriate to report it to the people responsible for all that patching.

The files in question are linux-2.6.3-gentoo/arch/{alpha,i386,ia64,mips,parisc,ppc{,64},s390,sh,sparc{,64},um,x86_64}/Kconfig

This bug existed in documentation only in 2.6.1; the Kconfig docs gave the limit, but it wasn't enforced.
Comment 1 Jason Cox (RETIRED) gentoo-dev 2004-03-25 15:02:42 UTC
Could you possibly give an example as to which SMP code might be beneficial to UP boxes?

SMP machines do things in a manner that requires a whole new method of thinking over the uniprocessor machines. The busses and local, as opposed to global, spinlocks are the main culprits here. With one processor, you don't really have to worry about the interrupt controllers. With multiple processors, when the interrupt is raised, the importance of the interrupt, and which processor it is assigned to are all taken into affect. I'm jut having trouble visualizing which bits of code could help uniprocessor machines.
Comment 2 Greg Kroah-Hartman (RETIRED) gentoo-dev 2004-03-25 15:08:54 UTC
This is a kernel config question, not a gentoo-kernel issue, as the gentoo-kernel 
does not patch this code at all.

Also, if you enable CONFIG_PREEMPT, and run a UP kernel, all of the SMP code is still present (spinlocks, etc.)

And by definition, the NUM_CPUS can not be less than 2 for a SMP kernel.  The fact that you can choose this at all is a memory savings only (if you select less than the default 32 you save some space in kernel memory for some variable types.)

So in short, this is not a bug at all.