From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753640AbaCGR76 (ORCPT ); Fri, 7 Mar 2014 12:59:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35202 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751975AbaCGR74 (ORCPT ); Fri, 7 Mar 2014 12:59:56 -0500 Message-ID: <531A0911.4040304@redhat.com> Date: Fri, 07 Mar 2014 18:59:45 +0100 From: Thomas Graf Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Pravin Shelar CC: Zoltan Kiss , Jesse Gross , "dev@openvswitch.org" , xen-devel@lists.xenproject.org, netdev , LKML Subject: Re: [PATCH] openvswitch: Orphan frags before sending to userspace via Netlink to avoid guest stall References: <1393615016-9187-1-git-send-email-zoltan.kiss@citrix.com> <5319F272.1070101@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/07/2014 06:28 PM, Pravin Shelar wrote: > Problem is mapping SKBTX_DEV_ZEROCOPY pages to userspace. skb_zerocopy > is not doing that. > > Unless I missing something, Current netlink code can not handle > skb-frags with zero copy. So we have to copy skb anyways and no need > to orphan-frags here. > If you are planning on handling skb-frags without copying then > skb_orphan_frags should be done in netlink. If you look at the second part of skb_zerocopy() this is exactly what it is doing unless the target skb has sufficient linear space preallocated. At least unless mmap is enabled in which case we would have to copy again until we have implemented a way to pass page refs via the nl ring buffer. So I think Zoltan is correct in orphaning frags that come from f.e. a tun device via zerocopy_sg_from_iovec().