From: Jens Axboe on
On Mon, May 24 2010, Michael Kerrisk wrote:
> On Mon, May 24, 2010 at 7:35 PM, Jens Axboe <jens.axboe(a)oracle.com> wrote:
> > On Mon, May 24 2010, Michael Kerrisk wrote:
> >> > Right, that looks like a thinko.
> >> >
> >> > I'll submit a patch changing it to bytes and the agreed API and fix this
> >> > -Eerror. Thanks for your comments and suggestions!
> >>
> >> Thanks. And of course you are welcome. (Please CC linux-api(a)vger on
> >> this patche (and all patches that change the API/ABI.)
> >
> > The first change is this:
> >
> > http://git.kernel.dk/?p=linux-2.6-block.git;a=commit;h=0191f8697bbdfefcd36e7b8dc3eeddfe82893e4b
> >
> > and the one dealing with the pages vs bytes API is this:
> >
> > http://git.kernel.dk/?p=linux-2.6-block.git;a=commit;h=b9598db3401282bb27b4aef77e3eee12015f7f29
> >
> > Not tested yet, will do so before sending in of course.
>
> Eyeballing it quickly, these changes look right.

Good, thanks.

> Do you have some test programs you can make available?

Actually I don't, I test it by modifying fio's splice engine to set/get
the pipe size and test the resulting transfers.

--
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Michael Kerrisk on
On Mon, May 24, 2010 at 8:12 PM, OGAWA Hirofumi
<hirofumi(a)mail.parknet.co.jp> wrote:
> Jens Axboe <jens.axboe(a)oracle.com> writes:
>
>>> > Isn't that pretty much what I described?
>>>
>>> Yes, probably. Well, 120kb was still multiple of page size. :)
>>
>> It is, but 120KB/page_size is not (which is the power-of-2 of interest
>> here).
>
> Um... I have no interest whether rounded-up-size is power-of-2 or
> not. Because it is implementation detail.
>
> Anyway, we agreed with "in bytes" and "at least"? If so, I'm happy with
> it, and I'm sorry if I was just noise.

I thought it was good input!



--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface" http://blog.man7.org/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: OGAWA Hirofumi on
Jens Axboe <jens.axboe(a)oracle.com> writes:

>> > Isn't that pretty much what I described?
>>
>> Yes, probably. Well, 120kb was still multiple of page size. :)
>
> It is, but 120KB/page_size is not (which is the power-of-2 of interest
> here).

Um... I have no interest whether rounded-up-size is power-of-2 or
not. Because it is implementation detail.

Anyway, we agreed with "in bytes" and "at least"? If so, I'm happy with
it, and I'm sorry if I was just noise.
--
OGAWA Hirofumi <hirofumi(a)mail.parknet.co.jp>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Michael Kerrisk on
On Mon, May 24, 2010 at 7:56 PM, Jens Axboe <jens.axboe(a)oracle.com> wrote:
> On Mon, May 24 2010, Michael Kerrisk wrote:
>> On Mon, May 24, 2010 at 7:35 PM, Jens Axboe <jens.axboe(a)oracle.com> wrote:
>> > On Mon, May 24 2010, Michael Kerrisk wrote:
>> >> > Right, that looks like a thinko.
>> >> >
>> >> > I'll submit a patch changing it to bytes and the agreed API and fix this
>> >> > -Eerror. Thanks for your comments and suggestions!
>> >>
>> >> Thanks. And of course you are welcome. (Please CC linux-api(a)vger on
>> >> this patche (and all patches that change the API/ABI.)
>> >
>> > The first change is this:
>> >
>> > http://git.kernel.dk/?p=linux-2.6-block.git;a=commit;h=0191f8697bbdfefcd36e7b8dc3eeddfe82893e4b
>> >
>> > and the one dealing with the pages vs bytes API is this:
>> >
>> > http://git.kernel.dk/?p=linux-2.6-block.git;a=commit;h=b9598db3401282bb27b4aef77e3eee12015f7f29
>> >
>> > Not tested yet, will do so before sending in of course.
>>
>> Eyeballing it quickly, these changes look right.
>
> Good, thanks.
>
>> Do you have some test programs you can make available?
>
> Actually I don't, I test it by modifying fio's splice engine to set/get
> the pipe size and test the resulting transfers.

Two more questions: is the rationale for this feature written up
somewhere? I could not find it. Is it primarily intended for
splice/vmsplice/tee, with the effect for pipe(2) being a side effect?

Also, the minuimum size of the buffer is 2 pages. Why is it not 1?
(Notwithstanding Linus's assertion, a buffer size of 1 page did give
us POSIX compliance in kernels before 2.6.10.)

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/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Michael Kerrisk on
Jens,

On Mon, May 24, 2010 at 7:56 PM, Jens Axboe <jens.axboe(a)oracle.com> wrote:
> On Mon, May 24 2010, Michael Kerrisk wrote:
>> On Mon, May 24, 2010 at 7:35 PM, Jens Axboe <jens.axboe(a)oracle.com> wrote:
>> > On Mon, May 24 2010, Michael Kerrisk wrote:
>> >> > Right, that looks like a thinko.
>> >> >
>> >> > I'll submit a patch changing it to bytes and the agreed API and fix this
>> >> > -Eerror. Thanks for your comments and suggestions!
>> >>
>> >> Thanks. And of course you are welcome. (Please CC linux-api(a)vger on
>> >> this patche (and all patches that change the API/ABI.)
>> >
>> > The first change is this:
>> >
>> > http://git.kernel.dk/?p=linux-2.6-block.git;a=commit;h=0191f8697bbdfefcd36e7b8dc3eeddfe82893e4b
>> >
>> > and the one dealing with the pages vs bytes API is this:
>> >
>> > http://git.kernel.dk/?p=linux-2.6-block.git;a=commit;h=b9598db3401282bb27b4aef77e3eee12015f7f29
>> >
>> > Not tested yet, will do so before sending in of course.
>>
>> Eyeballing it quickly, these changes look right.
>
> Good, thanks.
>
>> Do you have some test programs you can make available?
>
> Actually I don't, I test it by modifying fio's splice engine to set/get
> the pipe size and test the resulting transfers.

An afterthought. Do there not also need to be fixes to the /proc
interfaces. I don't think they were included in your revised patches.

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/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/