Thread (14 messages) 14 messages, 2 authors, 2010-05-10

Re: [PATCHv7] add mergeable buffers support to vhost_net

From: David Stevens <hidden>
Date: 2010-05-10 17:46:19
Also in: kvm, virtualization

netdev-owner@vger.kernel.org wrote on 05/10/2010 10:25:57 AM:
On Mon, May 10, 2010 at 10:09:03AM -0700, David Stevens wrote:
quoted
Since "datalen" carries the difference and will be negative by that 
amount
quoted
from the original loop, what about just adding something like:

        }
        if (headcount)
                heads[headcount-1].len += datalen;
[and really, headcount >0 since datalen > 0, so just:

        heads[headcount-1].len += datalen;

                                                +-DLS
This works too, just does more checks and comparisons.
I am still surprised that you were unable to reproduce the problem.
I'm sure it happened, and probably had a performance
penalty on my systems too, but not as much as yours.
I didn't see any obvious performance difference running
with the patch, though; not sure why. I'll instrument to
see how often it's happening, I think.
        But fixed now, good catch!

                                                        +-DLS
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help