SMP-Linux
Hello List,
I am new to this so please forgive this post if it seems stupid.
Is it possible to design a SMP-Linux kernel with architecture independent SMP support, for example, like the VFS provides an interface to specific filesystems, the "VSMP" can provide an architecture independent way to support SMP? There can be a function that does the spinlock stuff and underneath is a machine dependent implementation (this is already done for x86, what about other MP capable architectures?), and same for the scheduler. Lots of other stuff like TLB issues and so on would have to be taken care of as well. I'm no expert on SMP so I don't really know if a "virtual" SMP support is possible in the way I am describing it.
Is this an interesting idea to anyone? I expect it has been thought of before, but maybe it needs a hell of a lot of research to even begin thinking about it seriously. If anyone is interesting in really thrashing this out off list (or on list, but is this considered bad netiquette?), please mail me. I am very interested in discussing this in horrid detail :-)
When I buy my SMP system, I plan to hack in the first stages of such "VSMP" support if it's feasible.
Again, I don't really know what I'm doing so please go easy on me :-) I am still in the early stages of soaking up the stuff in the Intel CPU programming manuals.
Thanks!
James
Quoted 4 lines · James Buchanan
Is it possible to design a SMP-Linux kernel with architecture independent SMP support, for example, like the VFS provides an interface to specific filesystems, the "VSMP" can provide an architecture independent way to support SMP?
Why stop there? Why not make a complete hardware abstraction layer?
Oh, by the way, I have two words for you:
DUCK!
:-)
Quoted 7 lines
There can be a function
that does the spinlock stuff and underneath is a machine dependent implementation (this is already done for x86, what about other MP capable architectures?), and same for the scheduler. Lots of other stuff like TLB issues and so on would have to be taken care of as well. I'm no expert on SMP so I don't really know if a "virtual" SMP support is possible in the way I am describing it.
What you are describing sounds very much like a Virtual Machine.
Been there, done that, and it does have some benefits.
Good Luck,
John S.
Quoted 1 line
Why stop there? Why not make a complete hardware abstraction layer?
NetBSD has - hasn't it? Take a look!
Quoted 5 lines
Oh, by the way, I have two words for you:
DUCK!
:-)
Uh oh ... ;-)
Quoted 3 lines
What you are describing sounds very much like a Virtual Machine.
Been there, done that, and it does have some benefits.
Yes, a HAL, very much, but not really a VM, only a very thin layer of architecture-nuturalness. Very thin. The trickery I have learnt from the NetBSD project is that it has some very clever glue code below this HAL. I suppose to maintain acceptable performance levels. Then again the goals of NetBSD and Linux are different in some respects, Linux likes raw speed and was originally only for the x86 and NetBSD likes portability above that.
So I suppose my experiment will never really take off, but could have some interesting results!
--
James
Quoted 10 lines · James Buchanan
Yes, a HAL, very much, but not really a VM, only a very thin layer of architecture-nuturalness. Very thin. The trickery I have learnt from the NetBSD project is that it has some very clever glue code below this HAL. I suppose to maintain acceptable performance levels. Then again the goals of NetBSD and Linux are different in some respects, Linux likes raw speed and was originally only for the x86 and NetBSD likes portability above that.
So I suppose my experiment will never really take off, but could have some interesting results!
Well... how do you think linux actually works ? Did you bother _reading_ the code before proposing to do something that is basically already there ? :)
Ben (happily running SMP on PowerPC architecture).
Ben.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 11 lines · James Buchanan
Quoted 3 lines
Well... how do you think linux actually works ? Did you bother _reading_ the code before proposing to do something that is basically already there ? :)
Ah! No, not really. It is not a complete HAL. And no, I didn't read all the source, I am not sure if anyone can do that very successfully. I did know there was SMP, yup. Seen it all...
The sources are very hard to read! Poor design/no design, lack of documentation, shit documentation from programmers that can't spell, etc. ;-)
Hrm... In your previous mail, you talked about doing a thin layer that gives efficiency. That's exactly what it is.
Honestly, you can find crappy code in linux here or there, that's not the problem. I doubt you'll be able to backup your claims very long regarding this specific one which is SMP, especially in 2.5 kernels.
But feel free to prove me wrong by actually doing something, then showing us numbers !
Ben.