netdev
[Top] [All Lists]

Re: [PLEASE-TESTME] Zerocopy networking patch, 2.4.0-1

To: "David S. Miller" <davem@xxxxxxxxxx>
Subject: Re: [PLEASE-TESTME] Zerocopy networking patch, 2.4.0-1
From: Christoph Hellwig <hch@xxxxxxxxxx>
Date: Tue, 9 Jan 2001 12:28:10 +0100
Cc: mingo@xxxxxxx, riel@xxxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
In-reply-to: <200101091031.CAA01242@xxxxxxxxxxxxxxx>; from davem@xxxxxxxxxx on Tue, Jan 09, 2001 at 02:31:13AM -0800
Mail-followup-to: "David S. Miller" <davem@xxxxxxxxxx>, mingo@xxxxxxx, riel@xxxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
References: <Pine.LNX.4.21.0101081603080.21675-100000@xxxxxxxxxxxxxxxxxxxxxxxx> <Pine.LNX.4.30.0101091051460.1159-100000@e2> <20010109113145.A28758@xxxxxxxxxx> <200101091031.CAA01242@xxxxxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
On Tue, Jan 09, 2001 at 02:31:13AM -0800, David S. Miller wrote:
>    Date: Tue, 9 Jan 2001 11:31:45 +0100
>    From: Christoph Hellwig <hch@xxxxxxxxxx>
> 
>    Yuck.  A new file_opo just to get a few benchmarks right ...  I
>    hope the writepages stuff will not be merged in Linus tree (but I
>    wish the code behind it!)
> 
> It's a "I know how to send a page somewhere via this filedescriptor
> all by myself" operation.  I don't see why people need to take
> painkillers over this for 2.4.x.  I think f_op->write is stupid, such
> a special case file operation just to get a few benchmarks right.
> This is the kind of argument I am hearing.
> 
> Orthogonal to f_op->write being for specifying a low-level
> implementation of sys_write, f_op->writepage is for specifying a
> low-level implementation of sys_sendfile.  Can you grok that?

Sure.  But sendfile is not one of the fundamental UNIX operations...
If there was no alternative to this I would probably have not said
anything, but with the rw_kiovec file op just before the door I don't
see any reason to add this _very_ specific file operation.

An alloc_kiovec before and an free_kiovec after the actual call
and the memory overhaed of a kiobuf won't hurt so much that it stands
against a clean interface, IMHO.


> 
> Linus has already seen this.  Originally he had a gripe because in an
> older revision of the code used to allow multiple pages to be passed
> in an array to the writepage(s) operation.  He didn't like that, so I
> made it take only one page as he requested.  He had no other major
> objections to the infrastructure.

You get that multiple page call with kiobufs for free...

        Christoph

-- 
Whip me.  Beat me.  Make me maintain AIX.

<Prev in Thread] Current Thread [Next in Thread>