From: Ingo Molnar <mingo@elte.hu>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Zach Brown <zach.brown@oracle.com>,
Ulrich Drepper <drepper@redhat.com>,
David Miller <davem@davemloft.net>,
linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
tglx@linutronix.de, torvalds@linux-foundation.org
Subject: Re: [PATCHv4 5/6] Allow setting O_NONBLOCK flag for new sockets
Date: Tue, 20 Nov 2007 23:22:27 +0100 [thread overview]
Message-ID: <20071120222227.GH24156@elte.hu> (raw)
In-Reply-To: <474331B7.6020802@zytor.com>
* H. Peter Anvin <hpa@zytor.com> wrote:
> It seems that you're doing the same thing in both cases, except you're
> now extending it to include other random functionality, which means
> other things than syslets are suddenly affected.
>
> syslets are arguably a little bit different, since what you're
> effectively doing there is running a miniature interpreted language in
> kernel space. A higher startup overhead should be acceptable, since
> you're amortizing it over a larger number of calls. Extending that
> mechanism suddenly means you HAVE to use that interpreted language
> message mechanism to access certain system calls, which really does
> not seem like a good thing neither for performance nor for encouraging
> sane design of interfaces.
whether that interpreted syslet language survives is still an open
question - it was extremely ugly when i wrote the first version of it
and it only got uglier since then :-)
do you suggest that extending the system call calling convention to
include an arbitrary number of parameters will solve all these API needs
we have at the moment?
if yes, then a one-shot syslet/async call would in essence be:
syslet_arg1 ... N, syscall_arg 1 ... M
the same is true for the indirect stuff, we in essence nest syscalls
inside another syscall:
sys_indirect arg1 ... N, syscall arg 1 ... M
this all assumes an arbitrarily extendable syscall ABI, which can take
N+M parameters. Right?
i'm not entirely sure we really want to do this. Nested syscalls would
have to unpack the arguments and repack them into a kernel-internal call
format anyway. So there's no performance upside - in fact i can only see
additional complications.
Why not just pin down the current ABI that there's 6 syscall parameters
_and not more_? It's totally sensible, and indirection has some minimal
costs anyway, so copying the nested syscall parameters is a non-issue.
This is not ad-hoc and when i wrote syslets i actually profiled the
performance a variable-length calling convention and decided _against_
it. Nothing beats the performance of a straight fixd-length copy of 6x4
(or 6x8) bytes.
The memory access cost argument you mentioned is largely irrelevant and
inapposite here, this is all passed in on the stack which is well-cached
in the L1 cache.
Ingo
next prev parent reply other threads:[~2007-11-20 22:23 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-20 6:53 Ulrich Drepper
2007-11-20 7:59 ` David Miller
2007-11-20 16:04 ` Ulrich Drepper
2007-11-20 18:13 ` H. Peter Anvin
2007-11-20 18:24 ` Zach Brown
2007-11-20 19:12 ` H. Peter Anvin
2007-11-20 22:22 ` Ingo Molnar [this message]
2007-11-20 22:33 ` Davide Libenzi
2007-11-20 22:42 ` Ingo Molnar
2007-11-20 23:25 ` H. Peter Anvin
2007-11-20 23:41 ` Ingo Molnar
2007-11-20 23:57 ` H. Peter Anvin
2007-11-26 18:17 ` Linus Torvalds
2007-11-26 18:45 ` Ingo Molnar
2007-11-26 19:07 ` H. Peter Anvin
2007-11-26 19:55 ` Davide Libenzi
2007-11-26 19:20 ` H. Peter Anvin
2007-11-26 23:25 ` Ulrich Drepper
2007-11-27 0:14 ` H. Peter Anvin
2007-11-27 0:42 ` Ulrich Drepper
2007-11-27 1:23 ` H. Peter Anvin
2007-11-27 2:14 ` Linus Torvalds
2007-11-27 2:38 ` H. Peter Anvin
2007-11-20 21:48 ` David Miller
2007-11-20 21:55 ` Zach Brown
2007-11-20 22:36 ` David Miller
2007-11-20 17:54 ` Zach Brown
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=20071120222227.GH24156@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=drepper@redhat.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=zach.brown@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®