Re: [PATCH 2/2] virtio_net: Improve the recv buffer allocation scheme

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Rusty Russell
Date: Wednesday, October 8, 2008 - 5:55 pm

On Thursday 09 October 2008 06:34:59 Mark McLoughlin wrote:

Hi Mark!

There are three approaches we should investigate before adding YA feature.  
Obviously, we can simply increase the number of ring entries.

Secondly, we can put the virtio_net_hdr at the head of the skb data (this is 
also worth considering for xmit I think if we have headroom) and drop 
MAX_SKB_FRAGS which contains a gratuitous +2.

Thirdly, we can try to coalesce contiguous buffers.  The page caching scheme 
we have might help here, I don't know.  Maybe we should be explicitly trying 
to allocate higher orders.

Now, that said, we might need this anyway.  But let's try the easy things 
first?  (Or as well...)


That's a virtio transport breakage: can you use the standard virtio mechanism, 
just put the extended length or number of extra buffers inside the 
virtio_net_hdr?

That makes more sense to me.


...

I think you need kmap_atomic() here to access the page.  And yes, that will 
effect performance :(

A few more comments moved from the patch header into the source wouldn't go 
astray, but I'm happy to do that myself (it's been on my TODO for a while).

Thanks!
Rusty.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/2] virtio_net: Recycle some more rx buffer pages, Mark McLoughlin, (Wed Oct 8, 12:34 pm)
Re: [PATCH 2/2] virtio_net: Improve the recv buffer alloca ..., Rusty Russell, (Wed Oct 8, 5:55 pm)