Messages in this thread | | | Date | Sat, 13 Jul 2002 04:04:51 -0400 (EDT) | From | Alexander Viro <> | Subject | Re: [patch[ Simple Topology API |
| |
On Fri, 12 Jul 2002, Matthew Dobson wrote:
> Here is a very rudimentary topology API for NUMA systems. It uses prctl() for > the userland calls, and exposes some useful things to userland. It would be > nice to expose these simple structures to both users and the kernel itself. > Any architecture wishing to use this API simply has to write a .h file that > defines the 5 calls defined in core_ibmnumaq.h and include it in asm/mmzone.h. > Voila! Instant inclusion in the topology! > > Enjoy!
It's hard to enjoy the use of prctl(). Especially for things like "give me the number of the first CPU in node <n>" - it ain't no process controll, no matter how you stretch it.
<soapbox> That's yet another demonstration of the evil of multiplexing syscalls. They hide the broken APIs and make them easy to introduce. And broken APIs get introduced - through each of these. prctl(), fcntl(), ioctl() - you name it. Please, don't do that. </soapbox>
Please, replace that API with something sane. "Current processor" and _maybe_ "current node" are reasonable per-process things (even though the latter is obviously redundant). They are inherently racy, however - if you get scheduled on the return from syscall the value may have nothing to reality by the time you return to userland. The rest is obviously system-wide _and_ not process-related (it's "tell me about the configuration of machine"). Implementing them as prctls makes absolutely no sense. If anything, that's sysctl material.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |