[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTik7HU0wyub3krZb_aABsHp-_LvNLtAr5CaAo4_A@mail.gmail.com>
Date: Fri, 19 Nov 2010 14:49:46 -0800
From: Tom Herbert <therbert@...gle.com>
To: David Miller <davem@...emloft.net>
Cc: rick.jones2@...com, netdev@...r.kernel.org
Subject: Re: Generalizing mmap'ed sockets
> I think the ACK (or for UDP, the kfree_skb() after TX completes) should
> move the consumer pointer. Otherwise you have to copy, and the ACKs
> do not clock the sender process properly.
>
Right, with the caveats that even ACK'ed data might still go out on
the with that was discussed in the vmsplice() related patches. I
don't think this should make the problem any worse.
> But you do bring up an interesting point about TX buffer space sizing.
>
> This whole scheme currently seems to completely ignore buffer size
> auto-tuning done by TCP, and that won't fly I think. :-)
>
> The whole point is to make it so that applications do not need to know
> about that aspect of buffering at all. With the current mmap design
> we're back to the stone ages where the app essentially has to pick an
> explicit send buffer size.
True, and I would never say that this is suitable replacement for all
TCP transmit. However, there are specialized applications where this
could be applied. Note that the buffer is not just a kernel buffer,
it is also an application visible buffer with more purpose than just
buffering data for transmit. For instance, an application using RPC
could assemble it's message directly into this buffer (which is cool).
The obvious alternative would be to malloc a buffer and then just use
vmsplice(), either way the application will be allocating a send
buffer for its work.
Tom
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists