From: "Rémi Denis-Courmont" <remi.denis-courmont@nokia.com>
To: "ext Ulrich Drepper" <drepper@redhat.com>
Cc: Michael Kerrisk <mtk.manpages@googlemail.com>,
Andrew Morton <akpm@linux-foundation.org>,
David Miller <davem@davemloft.net>,
Davide Libenzi <davidel@xmailserver.org>,
Alan Cox <alan@redhat.com>, Jakub Jelinek <jakub@redhat.com>,
lkml <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
netdev <netdev@vger.kernel.org>,
Roland McGrath <roland@redhat.com>,
Oleg Nesterov <oleg@tv-sign.ru>, Christoph Hellwig <hch@lst.de>
Subject: Re: sys_paccept: disable paccept() until API design is resolved
Date: Wed, 17 Sep 2008 09:50:58 +0300 [thread overview]
Message-ID: <200809170950.58844.remi.denis-courmont@nokia.com> (raw)
In-Reply-To: <48D03E85.9030808@redhat.com>
On Wednesday 17 September 2008 02:17:25 ext Ulrich Drepper, you wrote:
> It would unnecessarily require programs to be changed. I've explained
> that programs cannot efficiently use accept() and poll() when multiple
> threads are involved. This means in these situations you'll find a
> single thread handling only the accept() calls.
Hmm. In a multithreaded program, it makes a lot of sense to use blocking I/O
in general - not just blocking accept(). Of course, this assumes that there
is only one file descriptor to wait on at a time. This is not necessarily
true for I/O, nor is it for accept(). For instance, modern TCP servers should
have an IPv4 and an IPv6 socket to accept() from...
If the code path is such that only one file descriptor is being waited on at a
time, then using blocking I/O halves the number of syscalls, and thirds the
number of context switch between hardware packet reception, and userland data
deliver (3 to 1).
> > * The use of a sigset argument is not consistent with other I/O APIs
> > that can block on a single file descriptor (e.g., read(), recv(),
> > connect()).
>
> This is because none of the other interfaces had (so far) be revised.
> With this flawed argumentation you'd prevent any program ever to be made.
Right.
Then again... Why not recommend threaded programs to use sigwait() in a
dedicated task and give up on the asynchronous signal handlers completely?
--
Rémi Denis-Courmont
Maemo Software, Nokia Devices R&D
next prev parent reply other threads:[~2008-09-17 6:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-16 12:05 Michael Kerrisk
2008-09-16 13:04 ` Oleg Nesterov
2008-09-16 23:17 ` Ulrich Drepper
2008-09-17 0:24 ` Michael Kerrisk
2008-09-17 16:46 ` Evgeniy Polyakov
2008-09-17 1:22 ` Nick Piggin
2008-09-17 6:50 ` Rémi Denis-Courmont [this message]
2008-09-17 14:30 ` Oleg Nesterov
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=200809170950.58844.remi.denis-courmont@nokia.com \
--to=remi.denis-courmont@nokia.com \
--cc=akpm@linux-foundation.org \
--cc=alan@redhat.com \
--cc=davem@davemloft.net \
--cc=davidel@xmailserver.org \
--cc=drepper@redhat.com \
--cc=hch@lst.de \
--cc=jakub@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mtk.manpages@googlemail.com \
--cc=netdev@vger.kernel.org \
--cc=oleg@tv-sign.ru \
--cc=roland@redhat.com \
--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
all inboxes | Powered by JetHome®