CPU attachent and detachment in a running Linux system
Hi,
Quoted 5 lines
Quoted 3 lines
I still wonder what you and other people think about the idea of an interface where the parts of the kernel with per-cpu dependencies should register two functions...
Why not compile kernel with structeres big enough for 32 processors, and then just add CPUs up to the limit without changing anything?
That's a good point and it would probably work for attachment of cpus, but it won't work for detachment because there are some data structures that need to be updated if a cpu gets detached. For example it would be nice to flush the per-cpu cache of the detached cpu in the slabcache. Then one has to think of pending tasklets for the detached cpu which should be moved to another cpu and then there are a lot of per-cpu data structures in the networking part of the kernel.. most of them seem to be for statistics only but I think these structures should be updated in any case.
So at least for detaching it would make sense to register functions which will be called whenever a cpu gets detached.
Heiko
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
Quoted 8 lines · On Mon, 18 Dec 2000 [email protected] wrote:
Hi,
Quoted 5 lines
Quoted 3 lines
I still wonder what you and other people think about the idea of an interface where the parts of the kernel with per-cpu dependencies should register two functions...
Why not compile kernel with structeres big enough for 32 processors, and then just add CPUs up to the limit without changing anything?
Quoted 11 lines
That's a good point and it would probably work for attachment of cpus, but it won't work for detachment because there are some data structures that need to be updated if a cpu gets detached. For example it would be nice to flush the per-cpu cache of the detached cpu in the slabcache. Then one has to think of pending tasklets for the detached cpu which should be moved to another cpu and then there are a lot of per-cpu data structures in the networking part of the kernel.. most of them seem to be for statistics only but I think these structures should be updated in any case.
So at least for detaching it would make sense to register functions which will be called whenever a cpu gets detached.
Plus userspace CPU monitors will need to know when the CPU arrangement has changed.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
Quoted 12 lines
That's a good point and it would probably work for attachment of cpus, but it won't work for detachment because there are some data structures that need to be updated if a cpu gets detached. For example it would be nice to flush the per-cpu cache of the detached cpu in the slabcache. Then one has to think of pending tasklets for the detached cpu which should be moved to another cpu and then there are a lot of per-cpu data structures in the networking part of the kernel.. most of them seem to be for statistics only but I think these structures should be updated in any case.
So at least for detaching it would make sense to register functions which will be called whenever a cpu gets detached.
I remember someone from SGI had a patch to merge all the per cpu structures together which would make this easier. It would also save bytes especially on machines like the e10k where we must have NR_CPUS = 64.
Anton
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/