lkml.org 
[lkml]   [2010]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [patch] pipe: add support for shrinking and growing pipes
From
Hi all,

I see that this patch has hit Linus's git, so some questions

On Wed, May 19, 2010 at 6:49 PM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
>
> On Wed, 19 May 2010, Miklos Szeredi wrote:
>>
>> One issue I see is that it's possible to grow pipes indefinitely.
>> Should this be restricted to privileged users?
>
> Yes. But perhaps only if it grows past the default (or perhaps "default*2"
> or similar). That way a normal user could shrink the pipe buffers, and
> then grow them again if he wants to.
>
> Oh, and I think you need to also require that there be at least two
> buffers. Otherwise we can't guarantee POSIX behavior, I think.

Is there any documentation (e.g., a man-pages patch) for these changes?

The argument of the fcntl() operations is expressed in pages. I take
it that this means that the semantics of the argument will very
depending on the system page size? So for example, 2 on x86 will mean
8192 bytes, but will mean 32768 of ia64? That seems very weird. (And
what about architectures where the page size is switchable?) Such
changes in semantics should not be silent for the use, IMO.

I'm not so sure about Linus's assertion above about needing at least
two buffers (pages?) to guarantee POSIX behavior. Back in 2.16.10 and
earlier, the buffer size was a page (4096 bytes) on x86-32, and we had
POSIX-compliant behavior.

Cheers,

Michael


--
Michael Kerrisk Linux man-pages maintainer;
http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface", http://blog.man7.org/


\
 
 \ /
  Last update: 2010-05-23 07:33    [W:0.099 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site