All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Dobson <colpatch@us.ibm.com>
To: Alexander Viro <viro@math.psu.edu>
Cc: linux-kernel@vger.kernel.org,
	Michael Hohnbaum <hohnbaum@us.ibm.com>,
	Martin Bligh <mjbligh@us.ibm.com>,
	Linus Torvalds <torvalds@transmeta.com>,
	Andrew Morton <akpm@zip.com.au>
Subject: Re: [patch[ Simple Topology API
Date: Mon, 15 Jul 2002 16:52:38 -0700	[thread overview]
Message-ID: <3D336046.5000407@us.ibm.com> (raw)
In-Reply-To: Pine.GSO.4.21.0207130355180.13648-100000@weyl.math.psu.edu

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.
> 
> 



  parent reply	other threads:[~2002-07-15 23:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-13  0:35 [patch[ Simple Topology API Matthew Dobson
2002-07-13  2:49 ` Andrew Morton
2002-07-15 18:49   ` Matthew Dobson
2002-07-13  8:04 ` Alexander Viro
2002-07-13 17:13   ` Albert D. Cahalan
2002-07-15 23:52   ` Matthew Dobson [this message]
     [not found] <3D2F75D7.3060105@us.ibm.com.suse.lists.linux.kernel>
     [not found] ` <3D2F9521.96D7080B@zip.com.au.suse.lists.linux.kernel>
2002-07-13 20:08   ` Andi Kleen
2002-07-14 19:17     ` Linus Torvalds
2002-07-14 19:43       ` Andi Kleen
2002-07-15  2:34         ` Eric W. Biederman
2002-07-15 15:25           ` Sandy Harris
2002-07-15 16:33             ` Chris Friesen
2002-07-16 10:30             ` Eric W. Biederman
2002-07-16 12:59               ` Rik van Riel
2002-07-16 15:45               ` Martin J. Bligh
2002-07-16 19:03       ` Martin J. Bligh
2002-07-16 22:29       ` Matthew Dobson
2002-07-17  0:21       ` Michael Hohnbaum
2002-07-15 17:48     ` Matthew Dobson
  -- strict thread matches above, loose matches on Subject: below --
2002-07-15 19:50 Jukka Honkela

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D336046.5000407@us.ibm.com \
    --to=colpatch@us.ibm.com \
    --cc=akpm@zip.com.au \
    --cc=hohnbaum@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjbligh@us.ibm.com \
    --cc=torvalds@transmeta.com \
    --cc=viro@math.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.