Messages in this thread | | | Date | Mon, 15 Jul 2002 16:52:38 -0700 | From | Matthew Dobson <> | Subject | Re: [patch[ Simple Topology API |
| |
Al,
If I can get 1-2 syscalls for the Topo API, and 1-2 for the Membind API, I'll gladly make the changes. For now, though, prctl() works fine. If it needs to be changed at some point, it can be done in about 5 minutes...
As far as the raciness of the get_curr_cpu & get_curr_node calls, that is noted in the comments. Until we get a better way of exposing the current working processor to userspace, they'll have to do. I believe that having *some* idea of where you're running is better than having *no* idea of where you're running.
-Matt
Alexander Viro wrote: > > 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/
| |