Re: [PATCH] openvswitch: Orphan frags before sending to userspace via Netlink to avoid guest stall

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Do you have any feedback on this? I'm also adding KVM list as they might be interested in this.

Zoli

On 28/02/14 19:16, Zoltan Kiss wrote:
The kernel datapath now switched to zerocopy Netlink messages, but that also
means that the pages on frags array are sent straight to userspace. If those
pages came outside the kernel, we have to swap them out with local copies.

Signed-off-by: Zoltan Kiss <zoltan.kiss@xxxxxxxxxx>
---
  net/openvswitch/datapath.c |    6 ++++++
  1 file changed, 6 insertions(+)

diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index 36f8872..ffb563c 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -464,6 +464,12 @@ static int queue_userspace_packet(struct datapath *dp, struct sk_buff *skb,
  	}
  	nla->nla_len = nla_attr_size(skb->len);

+	if (unlikely(skb_orphan_frags(skb, GFP_ATOMIC))) {
+		err = -ENOMEM;
+		skb_tx_error(skb);
+		goto out;
+	}
+
  	skb_zerocopy(user_skb, skb, skb->len, hlen);

  	/* Pad OVS_PACKET_ATTR_PACKET if linear copy was performed */


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux