public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Ulrich Drepper <drepper@redhat.com>
Cc: David Miller <davem@davemloft.net>,
	linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	mingo@elte.hu, 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 10:13:30 -0800	[thread overview]
Message-ID: <474323CA.9030306@zytor.com> (raw)
In-Reply-To: <474305A5.7070100@redhat.com>

Ulrich Drepper wrote:
> 
>> And I agree with all of the objections raised by both H. Pater Anvin
>> and Eric Dumazet.
> 
> Eric had no arguments and HP's comments lack a viable alternative proposal.
> 

That's only because you're being, deliberately or accidentally, vague 
about what your actual (as opposed to imagined) requirements are.

The only thing concrete that I have seen is that the limitation to 6 
system call arguments is insufficient.  This is clearly true, as 
evidenced by things like pselect.  To which I responded that I'd *much* 
rather see a systematized way to handle the the system call ABI beyond 6 
arguments... the system call interface is a calling convention and 
should be treated as such, and the last thing we need is something that 
ends up looking like the MS-DOS kernel interface where every call has 
its own random convention.

The easy answer, to repeat myself, is to adopt the convention that for > 
6 system calls, the sixth argument register carries a pointer to the 6+ 
arguments.  This has minor performance disadvantages on platforms which 
use the stack for return addresses AND uses exactly six registers for 
arguments (a surprisingly common number.)  On those platforms we have 
the option of either take the extra user space copies, or pick a method 
for passing the in-memory copy in a pointer.

If the whole thing about "a dozen new [system calls]" then a dozen 
system calls added to the existing tables are better than this mess.

Inside the kernel, a lot of things could be cleaned up substantially by 
automating the generation of stubs, where necessary.  I did a lot of 
work in klibc to automatically generate stubs of various sorts; some of 
that work may be possible to re-use.

	-hpa

  reply	other threads:[~2007-11-20 18:14 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-20  6:53 [PATCHv4 5/6] Allow setting O_NONBLOCK flag for new sockets Ulrich Drepper
2007-11-20  7:59 ` David Miller
2007-11-20 16:04   ` Ulrich Drepper
2007-11-20 18:13     ` H. Peter Anvin [this message]
2007-11-20 18:24       ` Zach Brown
2007-11-20 19:12         ` H. Peter Anvin
2007-11-20 22:22           ` Ingo Molnar
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=474323CA.9030306@zytor.com \
    --to=hpa@zytor.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=drepper@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /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