Re: [RFC PATCH 2/2] macvtap: TX zero copy between guest and host kernel
From: Shirley Ma <hidden>
Date: 2010-09-29 14:37:27
Also in:
kvm, lkml
From: Shirley Ma <hidden>
Date: 2010-09-29 14:37:27
Also in:
kvm, lkml
On Wed, 2010-09-29 at 10:16 +0200, Michael S. Tsirkin wrote:
quoted
I compared several approaches for addressing the issue being raisedherequoted
on how/when to update vhost_add_used_and_signal. The simple approachIquoted
have found is: 1. Adding completion field in struct virtqueue; 2. when it is a zero copy packet, put vhost thread wait forcompletionquoted
to update vhost_add_used_and_signal; 3. passing vq from vhost to macvtap as skb destruct_arg; 4. when skb is freed for the last reference, signal vq completion The test results show same performance as the original patch. How doyouquoted
think? If it sounds good to you. I will resubmit this reversionpatch.quoted
The patch still keeps as simple as it was before. :) Thanks ShirleyIf you look at dev_hard_start_xmit you will see a call to skb_orphan_try which often calls the skb destructor. So I suspect this is almost equivalent to your original patch, and has the same correctness issue.
If I didn't address this, then vhost net will wait for ever with wait for completion :)) Thanks Shirley