lkml.org 
[lkml]   [2012]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 2/2] virtio-ring: Allocate indirect buffers from cache when possible
On Fri, Aug 31, 2012 at 11:36:07AM +0200, Sasha Levin wrote:
> On 08/30/2012 03:38 PM, Michael S. Tsirkin wrote:
> >> +static unsigned int indirect_alloc_thresh = 16;
> > Why 16? Please make is MAX_SG + 1 this makes some sense.
>
> Wouldn't MAX_SG mean we always allocate from the cache? Isn't the memory waste
> too big in this case?

Sorry. I really meant MAX_SKB_FRAGS + 1. MAX_SKB_FRAGS is 17 so gets us
threshold of 18. It is less than the size of an skb+shinfo itself so -
does it look too big to you? Also why do you think 16 is not too big but
18 is? If there's a reason then I am fine with 16 too but then please
put it in code comment near where the value is set.

Yes this means virtio net always allocates from cache
but this is a good thing, isn't it? Gets us more consistent
performance.



--
MST


\
 
 \ /
  Last update: 2012-08-31 12:01    [W:0.083 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site