From: Matthew Dobson <colpatch@us.ibm.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Andrew Morton <akpm@zip.com.au>,
Linus Torvalds <torvalds@transmeta.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Martin Bligh <mjbligh@us.ibm.com>,
Andrea Arcangeli <andrea@suse.de>,
Michael Hohnbaum <hohnbaum@us.ibm.com>,
lse-tech <lse-tech@lists.sourceforge.net>
Subject: Re: [Lse-tech] [patch] Simple Topology API v0.3 (2/2)
Date: Thu, 22 Aug 2002 13:45:35 -0700 [thread overview]
Message-ID: <3D654D6F.1050701@us.ibm.com> (raw)
In-Reply-To: 20020822202412.B30036@infradead.org
Christoph,
I've had some comments/flames about that... One of the better suggestions that
I've heard so far is to change it to a /proc interface. I'll probably do that
today and resent the userspace patch. If you (or anyone) has better
suggestions, I'm definitely all ears (or eyes, I suppose ;)!
Cheers!
-Matt
Christoph Hellwig wrote:
> On Thu, Aug 22, 2002 at 12:15:07PM -0700, Matthew Dobson wrote:
>
>>diff -Nur linux-2.5.27-vanilla/kernel/sys.c linux-2.5.27-api/kernel/sys.c
>>--- linux-2.5.27-vanilla/kernel/sys.c Sat Jul 20 12:11:07 2002
>>+++ linux-2.5.27-api/kernel/sys.c Wed Jul 24 17:33:41 2002
>>@@ -20,6 +20,7 @@
>> #include <linux/device.h>
>> #include <linux/times.h>
>> #include <linux/security.h>
>>+#include <linux/topology.h>
>>
>> #include <asm/uaccess.h>
>> #include <asm/io.h>
>>@@ -1236,6 +1237,31 @@
>> mask = xchg(¤t->fs->umask, mask & S_IRWXUGO);
>> return mask;
>> }
>>+
>>+asmlinkage long sys_check_topology(int convert_type, int to_convert)
>>+{
>>+ int ret = 0;
>>+
>>+ switch (convert_type) {
>>+ case CPU_TO_NODE:
>>+ ret = cpu_to_node(to_convert);
>>+ break;
>>+ case MEMBLK_TO_NODE:
>>+ ret = memblk_to_node(to_convert);
>>+ break;
>>+ case NODE_TO_NODE:
>>+ ret = node_to_node(to_convert);
>>+ break;
>>+ case NODE_TO_CPU:
>>+ ret = node_to_cpu(to_convert);
>>+ break;
>>+ case NODE_TO_MEMBLK:
>>+ ret = node_to_memblk(to_convert);
>>+ break;
>>+ }
>>+
>>+ return (long)ret;
>>+}
>
>
> You don't consider this a proper syscall API, do you?
>
>
WARNING: multiple messages have this Message-ID (diff)
From: Matthew Dobson <colpatch@us.ibm.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Andrew Morton <akpm@zip.com.au>,
Linus Torvalds <torvalds@transmeta.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Martin Bligh <mjbligh@us.ibm.com>,
Andrea Arcangeli <andrea@suse.de>,
Michael Hohnbaum <hohnbaum@us.ibm.com>,
lse-tech <lse-tech@lists.sourceforge.net>
Subject: Re: [Lse-tech] [patch] Simple Topology API v0.3 (2/2)
Date: Thu, 22 Aug 2002 13:45:35 -0700 [thread overview]
Message-ID: <3D654D6F.1050701@us.ibm.com> (raw)
In-Reply-To: 20020822202412.B30036@infradead.org
Christoph,
I've had some comments/flames about that... One of the better suggestions that
I've heard so far is to change it to a /proc interface. I'll probably do that
today and resent the userspace patch. If you (or anyone) has better
suggestions, I'm definitely all ears (or eyes, I suppose ;)!
Cheers!
-Matt
Christoph Hellwig wrote:
> On Thu, Aug 22, 2002 at 12:15:07PM -0700, Matthew Dobson wrote:
>
>>diff -Nur linux-2.5.27-vanilla/kernel/sys.c linux-2.5.27-api/kernel/sys.c
>>--- linux-2.5.27-vanilla/kernel/sys.c Sat Jul 20 12:11:07 2002
>>+++ linux-2.5.27-api/kernel/sys.c Wed Jul 24 17:33:41 2002
>>@@ -20,6 +20,7 @@
>> #include <linux/device.h>
>> #include <linux/times.h>
>> #include <linux/security.h>
>>+#include <linux/topology.h>
>>
>> #include <asm/uaccess.h>
>> #include <asm/io.h>
>>@@ -1236,6 +1237,31 @@
>> mask = xchg(¤t->fs->umask, mask & S_IRWXUGO);
>> return mask;
>> }
>>+
>>+asmlinkage long sys_check_topology(int convert_type, int to_convert)
>>+{
>>+ int ret = 0;
>>+
>>+ switch (convert_type) {
>>+ case CPU_TO_NODE:
>>+ ret = cpu_to_node(to_convert);
>>+ break;
>>+ case MEMBLK_TO_NODE:
>>+ ret = memblk_to_node(to_convert);
>>+ break;
>>+ case NODE_TO_NODE:
>>+ ret = node_to_node(to_convert);
>>+ break;
>>+ case NODE_TO_CPU:
>>+ ret = node_to_cpu(to_convert);
>>+ break;
>>+ case NODE_TO_MEMBLK:
>>+ ret = node_to_memblk(to_convert);
>>+ break;
>>+ }
>>+
>>+ return (long)ret;
>>+}
>
>
> You don't consider this a proper syscall API, do you?
>
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
next prev parent reply other threads:[~2002-08-22 20:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-22 19:15 [patch] Simple Topology API v0.3 (2/2) Matthew Dobson
2002-08-22 19:24 ` [Lse-tech] " Christoph Hellwig
2002-08-22 19:24 ` Christoph Hellwig
2002-08-22 20:45 ` Matthew Dobson [this message]
2002-08-22 20:45 ` Matthew Dobson
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=3D654D6F.1050701@us.ibm.com \
--to=colpatch@us.ibm.com \
--cc=akpm@zip.com.au \
--cc=andrea@suse.de \
--cc=hch@infradead.org \
--cc=hohnbaum@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lse-tech@lists.sourceforge.net \
--cc=mjbligh@us.ibm.com \
--cc=torvalds@transmeta.com \
/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.