linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
To: Armin Schindler <aml@melware.de>
Cc: Willy Tarreau <willy@w.ods.org>,
	Armin Schindler <armin@melware.de>,
	Linux Kernel Mailinglist <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2.4] sys_select() return error on bad file
Date: Sun, 14 Mar 2004 12:58:42 -0300 (BRT)	[thread overview]
Message-ID: <Pine.LNX.4.44.0403141254500.2581-100000@dmt.cyclades> (raw)
In-Reply-To: <Pine.LNX.4.31.0403041016190.16757-100000@phoenix.one.melware.de>



On Thu, 4 Mar 2004, Armin Schindler wrote:

> On Thu, 4 Mar 2004, Willy Tarreau wrote:
> > Hi,
> >
> > On Wed, Mar 03, 2004 at 09:46:54AM +0100, Armin Schindler wrote:
> > > --- linux/fs/select.c_orig	2004-03-02 19:06:44.000000000 +0100
> > > +++ linux/fs/select.c	2004-03-03 09:25:24.000000000 +0100
> > > @@ -183,6 +183,8 @@
> > >  		wait = NULL;
> > >  	retval = 0;
> > >  	for (;;) {
> > > +		int file_err = 1;
> > > +
> >
> > Just a thought, select() is often performance-critical, and adding one more
> > variable inside the loop can slow it down a bit. Wouldn't it be cheaper to
> > set retval to -EBADF above and avoid using file_err ?
> 
> retval cannot be used for that, it may get changed in the loop.
> 
> Anyway, I don't see how your proposal would do better performance?
> My patch just adds a new variable on the stack, which should not make any
> difference in performance. And later, it is the same if the new or another
> variable gets changed or checked.

Curiosity: Does SuS/POSIX define behaviour for "all fds are closed" ? 



  parent reply	other threads:[~2004-03-14 15:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-03  8:46 [PATCH 2.4] sys_select() return error on bad file Armin Schindler
2004-03-04  7:22 ` Willy Tarreau
2004-03-04  9:20   ` Armin Schindler
2004-03-04 13:48     ` Willy Tarreau
2004-03-14 15:58     ` Marcelo Tosatti [this message]
2004-03-14 18:18 Manfred Spraul
2004-03-15 10:33 ` Armin Schindler

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=Pine.LNX.4.44.0403141254500.2581-100000@dmt.cyclades \
    --to=marcelo.tosatti@cyclades.com \
    --cc=aml@melware.de \
    --cc=armin@melware.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=willy@w.ods.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;
as well as URLs for NNTP newsgroup(s).