mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexandre Oliva <aoliva@redhat.com>
To: jmoyer@redhat.com
Cc: "Stephen C. Tweedie" <sct@redhat.com>,
	Marcelo Tosatti <marcelo.tosatti@cyclades.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@redhat.com>,
	akpm@osdl.org
Subject: Re: [patch rfc] towards supporting O_NONBLOCK on regular files
Date: 17 Oct 2004 04:59:51 -0300	[thread overview]
Message-ID: <orzn2lpyfc.fsf@livre.redhat.lsd.ic.unicamp.br> (raw)
In-Reply-To: <16751.61561.156429.120130@segfault.boston.redhat.com>

On Oct 15, 2004, Jeff Moyer <jmoyer@redhat.com> wrote:

jmoyer> Yes, that sounds like a fine idea.  Here is a patch which does
jmoyer> this.  Andrew, I know you only want bug fixes, but I'd like to get
jmoyer> this into your queue for post 2.6.9, if possible.

> I got the partial read case wrong in the last patch.  In fact, it looks
> like this code path would perform infinite retries before.  This should
> address that by returning upon the first partial read.  Attached is a new
> version of the patch.

Don't you have to adjust poll/select as well, to test whether read has
any data to return immediately?  Squid is broken with the latest
FCdevel kernel, and this patch is in it.

The reason Squid breaks is that poll (or is it select? I forget) says
there's data to be read from cache files (as well as from error
message files read during start up), but then read fails with -EAGAIN.
If I bring the error files into memory with cat
/etc/squid/errors/ERR*, then squid will successfully start up, and
then, in order for it to not eat all the available CPU polling data
files and attempting to read from them, I need to start a command line
this:

pid=`pidof '(squid)'
while :; do
  lsof -p $pid |
  sed -n 's,.*\(/var/spool/squid/.*/.*/.*\),\1,p' |
  xargs cat /dev/null > /dev/null;
  sleep 5
done

-- 
Alexandre Oliva             http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}

  parent reply	other threads:[~2004-10-17  8:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-01 20:57 Jeff Moyer
2004-10-03 19:48 ` Pavel Machek
2004-10-13 14:28   ` Jeff Moyer
2004-10-14 17:39     ` Pavel Machek
2004-10-05 11:27 ` Marcelo Tosatti
2004-10-06 13:13   ` Jeff Moyer
2004-10-06 12:01     ` Marcelo Tosatti
2004-10-07  3:31       ` Stephen C. Tweedie
2004-10-07 10:12         ` Marcelo Tosatti
2004-10-07 12:30           ` Arjan van de Ven
2004-10-11 18:32           ` Stephen C. Tweedie
2004-10-11 18:58             ` Jeff Moyer
2004-10-11 21:49               ` Stephen C. Tweedie
2004-10-13 14:26                 ` Jeff Moyer
2004-10-15 15:44                   ` Jeff Moyer
2004-10-15 16:19                     ` Stephen C. Tweedie
2004-10-17  7:59                     ` Alexandre Oliva [this message]
2004-10-17 11:20                       ` Ingo Molnar
2004-10-17 19:38                         ` Alexandre Oliva
2004-10-18 16:51                           ` Jeff Moyer
2004-10-19  6:04                             ` Alexandre Oliva
2004-10-21 20:14                             ` James Antill
2004-10-05 15:35 ` Rik van Riel
2004-10-05 13:07 Dan Kegel

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=orzn2lpyfc.fsf@livre.redhat.lsd.ic.unicamp.br \
    --to=aoliva@redhat.com \
    --cc=akpm@osdl.org \
    --cc=jmoyer@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.tosatti@cyclades.com \
    --cc=mingo@redhat.com \
    --cc=sct@redhat.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®