linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Albert D. Cahalan" <acahalan@cs.uml.edu>
To: npsimons@fsmlabs.com
Cc: acahalan@cs.uml.edu (Albert D. Cahalan),
	g.liakhovetski@ragingbull.com (Guennadi Liakhovetski),
	viro@math.psu.edu (Alexander Viro),
	linux-kernel@vger.kernel.org
Subject: Re: system call for process information?
Date: Tue, 13 Mar 2001 17:50:10 -0500 (EST)	[thread overview]
Message-ID: <200103132250.f2DMoAu426193@saturn.cs.uml.edu> (raw)
In-Reply-To: <20010313150235.A12677@fsmlabs.com> from "Nathan Paul Simons" at Mar 13, 2001 03:02:35 PM

Nathan Paul Simons writes:
> On Tue, Mar 13, 2001 at 04:05:13PM -0500, Albert D. Cahalan wrote:

>> Bloat removal: being able to run without /proc mounted.
>>
>> We don't have "kernel speed". We have kernel-mode screwing around
>> with text formatting.
>
> 	Or calculating things that really should be taken care of in
> user space, such as CPU utilization.

That can not be done reliably in user space. I know this; the "top"
program used to try.

>> This isn't just for him. Many people have wanted it.
>
> 	Yes, but how many people would actually *use* it?  How many
> programs out of the thousands out there would benefit from this?
> If it's more than 50 widely used packages, I'd be more than happy
> to see something that speeds them all up added to the kernel.

Oh please. How many programs use the mount() system call? One?
Most system calls are rarely used. This is OK.

>> 1. variable-length ASCII strings with undefined ad-hoc syntax
>
> 	Use enumerated string functions, always.
>
>> 2. array of fixed-size (64-bit) values
>
> 	It's an array?  That can still be overflowed by sloppy
> programming.

No it can't. You fill it like this:

tmp[0] = p->pid;
tmp[1] = p->uid;
/* ... */

Throw in some pretty symbolic names if you like. It's effectively
a struct, but a real struct would tempt people to use non-64-bit
values. Using an array enforces uniform 64-bit usage.

Good design involves NOT tempting people to write irregular hacks.

>  When it comes right down to it, I'd rather have
> something that could potentially die badly be run on the user
> side, rather than the kernel side.

Good. Thus you'd like the new system call in place of our
current pile of crud. Unfortunately the crud will need to
remain for at least a decade of transition time.

>> Parsing costs programmer time.
>
> 	But it's fairly easy to do in any number of programming
> languages besides C which can't be easily used in the kernel.
> Not to mention parsing libraries for C that fit much better on
> the user side because they would make the kernel huge and slow
> if compiled into it.

Huh? The kernel need not parse its own ASCII output. The kernel
natively maintains information in a binary format. The proposed
system call would not parse /proc output!!!

> 	Last but not least, I don't want to waste time in kernel
> scanning through a list of syscalls a mile long, half of them
> I don't ever use.

Well, tough luck. Learn to use an editor with search ability.
Even "less" and Netscape can search.

>  Or having a kernel that's so big that you
> can't fit it on embedded systems anymore.

The proposed system call was implemented for an embedded system.
This allowed operation without the /proc filesystem, which is
some serious bloat.

> And once you start
> adding every "nifty" syscall that comes along, that's what
> will happen.  So again, I say give us all a really good reason
> for this syscall, or just hack it into your own kernels and
> let us have our speedy, small vanilla kernels.

If you think /proc is speedy and small...




  reply	other threads:[~2001-03-13 22:52 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-12 17:08 system call for process information? Guennadi Liakhovetski
2001-03-12 18:27 ` Alexander Viro
2001-03-12 21:21   ` Guennadi Liakhovetski
2001-03-13  2:56     ` Nathan Paul Simons
2001-03-13  3:20       ` Alexander Viro
2001-03-13  9:55         ` Guennadi Liakhovetski
2001-03-13 21:05       ` Albert D. Cahalan
2001-03-13 22:02         ` Nathan Paul Simons
2001-03-13 22:50           ` Albert D. Cahalan [this message]
2001-03-13 22:52         ` Rik van Riel
2001-03-14  1:53           ` Martin Dalecki
2001-03-14  2:28             ` Rik van Riel
2001-03-14  8:24               ` george anzinger
2001-03-14 19:19                 ` Rik van Riel
2001-03-14 16:27                   ` george anzinger
2001-03-15 12:24                   ` changing mm->mmap_sem (was: Re: system call for process information?) Rik van Riel
2001-03-16  9:49                     ` Stephen C. Tweedie
2001-03-16 11:50                       ` Rik van Riel
2001-03-16 12:53                         ` Stephen C. Tweedie
2001-03-18  7:23                           ` Rik van Riel
2001-03-18  9:56                             ` Mike Galbraith
2001-03-18 10:46                               ` Rik van Riel
2001-03-18 12:33                                 ` Mike Galbraith
2001-03-14  1:59           ` system call for process information? john slee
2001-03-14 19:53   ` Szabolcs Szakacsits
2001-03-14 19:55     ` Alexander Viro
2001-03-14 20:23       ` Szabolcs Szakacsits
2001-03-14 20:21         ` Alexander Viro
2001-03-13 12:17 Rajiv Majumdar

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=200103132250.f2DMoAu426193@saturn.cs.uml.edu \
    --to=acahalan@cs.uml.edu \
    --cc=g.liakhovetski@ragingbull.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=npsimons@fsmlabs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).