From: "Manfred Spraul" <manfred@colorfullife.com>
To: <kuznet@ms2.inr.ac.ru>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: Feedback for fastselect and one-copy-pipe
Date: Mon, 12 Mar 2001 19:42:18 +0100 [thread overview]
Message-ID: <001601c0ab24$37a50d70$5517fea9@local> (raw)
In-Reply-To: <200103121812.VAA09627@ms2.inr.ac.ru>
From: <kuznet@ms2.inr.ac.ru>
> Hello!
>
> > * davem's patch breaks apps that assume that write(,PIPE_BUF) after
> > poll(POLLOUT) never blocks, even for blocking pipes.
>
> Pardon, but PIPE_BUF <= PAGE_SIZE yet, so that fears have no reasons.
>
The difference is the =
> <<<<< davem's patch
> + if (count >= PAGE_SIZE &&
> ^^
> + !(filp->f_flags & O_NONBLOCK)) {
> <<<<<<< my patch
> + if (count > PIPE_BUF && chars == PIPE_SIZE &&
^
> + (!(filp->f_flags & O_NONBLOCK))) {
> <<<<<<<
davem used >=, I used >. All other differences between our patches are
code cleanups.
Just try this on i386: (PIPE_BUF is defined to 4096 on i386 - I really
don't understand why, but now it's too late to reverse it back to 512)
<<<<
char buf[PIPE_BUF];
void main()
{
int pipes[2];
pipe(pipes);
write(pipes[1],buf,sizeof(buf));
}
<<<<<<<
It returns immediately on all unix platforms I tested, including all
linux versions, except with davem's patch.
It's not guaranteed in sus or posix, but I'm reluctant to change it.
--
Manfred
next prev parent reply other threads:[~2001-03-12 18:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-12 14:15 Feedback for fastselect and one-copy-pipe Ingo Oeser
2001-03-12 16:20 ` Mike Galbraith
2001-03-12 16:58 ` Ingo Oeser
2001-03-12 17:29 ` Mike Galbraith
2001-03-12 16:42 ` Manfred Spraul
2001-03-12 18:12 ` kuznet
2001-03-12 18:42 ` Manfred Spraul [this message]
2001-03-12 19:40 ` kuznet
2001-03-12 20:05 ` Manfred Spraul
2001-03-12 20:08 ` kuznet
2001-03-12 20:28 ` Manfred Spraul
2001-03-12 20:31 ` kuznet
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='001601c0ab24$37a50d70$5517fea9@local' \
--to=manfred@colorfullife.com \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.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