From: Jeff Licquia <licquia@progeny.com>
To: linux-ia64@vger.kernel.org
Subject: RE: [Fwd: Weird ia64 problem]
Date: Fri, 07 Oct 2005 14:29:43 +0000 [thread overview]
Message-ID: <1128695383.21049.11.camel@server1.internal.licquia.org> (raw)
In-Reply-To: <1128548614.4623.45.camel@laptop1>
On Wed, 2005-10-05 at 16:28 -0700, Luck, Tony wrote:
> Now, the question becomes "is this a bug". As you pointed
> out in an earlier e-mail the standard makes no mention of
> what happens when you read some data from a full pipe. So
> we appear not to be in violation of the letter of the standard.
>
> But this does fly in the face of common sense.
>
> As you say above, reporting the PIPE_BUF value as PAGE_SIZE
> [probably max(4096, PAGE_SIZE) ... for any arch that has a
> page size smaller than 4k] would fix this. But then we get
> back to the historical properties of 4k as the PIPE_BUF size.
> Would such a change break existing applications that are not
> well enough written to use fpathconf(fd, _PC_PIPE_BUF)?
I think there's a problem with this. While PIPE_BUF is specified in a
kernel header, it ends up becoming an embedded value in glibc, from what
I can tell. Which also makes it an embedded value in statically linked
apps. This looks like a dead end, even for apps that use fpathconf().
Also, from looking at some of the kernel comments (like where PIPE_SIZE
is defined), it seems that the kernel powers-that-be also intend to keep
PIPE_BUF and PAGE_SIZE decoupled.
So the way forward seems to be to add a test to pipe_readv() for this
condition.
I'm thinking it should check if (PIPE_SIZE - buf->len) > PIPE_BUF, and
set do_wakeup. The code could be #defined out if PIPE_SIZE = PIPE_BUF,
so the change reduces to a no-op on other archs.
Does that sound right? I'm going to work on a patch here.
next prev parent reply other threads:[~2005-10-07 14:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-05 21:43 [Fwd: Weird ia64 problem] Jeff Licquia
2005-10-05 21:54 ` Luck, Tony
2005-10-05 22:09 ` Luck, Tony
2005-10-05 22:13 ` Jeff Licquia
2005-10-05 22:30 ` Jeff Licquia
2005-10-05 22:33 ` Luck, Tony
2005-10-05 23:09 ` Jeff Licquia
2005-10-05 23:28 ` Luck, Tony
2005-10-05 23:40 ` Luck, Tony
2005-10-06 1:02 ` Ian Wienand
2005-10-07 14:29 ` Jeff Licquia [this message]
2005-10-08 2:40 ` Tony Luck
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=1128695383.21049.11.camel@server1.internal.licquia.org \
--to=licquia@progeny.com \
--cc=linux-ia64@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