From: Zoltan Kiss <zoltan.kiss@citrix.com>
To: Pravin Shelar <pshelar@nicira.com>
Cc: Jesse Gross <jesse@nicira.com>, Thomas Graf <tgraf@redhat.com>,
"dev@openvswitch.org" <dev@openvswitch.org>,
<xen-devel@lists.xenproject.org>, netdev <netdev@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>, <kvm@vger.kernel.org>
Subject: Re: [PATCH] openvswitch: Orphan frags before sending to userspace via Netlink to avoid guest stall
Date: Fri, 7 Mar 2014 12:29:34 +0000 [thread overview]
Message-ID: <5319BBAE.7030109@citrix.com> (raw)
In-Reply-To: <CALnjE+rWc=n_F+1jSLQtPrgKSvvxONEkkYxWEHon2_KVNG9z3Q@mail.gmail.com>
On 07/03/14 04:46, Pravin Shelar wrote:
> On Thu, Mar 6, 2014 at 9:09 AM, Zoltan Kiss <zoltan.kiss@citrix.com> wrote:
>> 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@citrix.com>
>
> I do not think this is required, netlink zero copy only maps
> pre-allocated buffers to user-space.
How do you mean "pre-allocated"? By who?
As far as I've seen the skb in this function came straight from the
device (vif in our case), and skb_zerocopy just copy the frags to
user_skb, which is sent to the userspace. Those frags contain pages from
guest, and it's a bad idea to pass them to userspace: e.g if userspace
dies in the meantime, what happens with them? Also, in Xen's case they
are actually not mapped to userspace, so accessing them can lead to garbage.
Zoli
next prev parent reply other threads:[~2014-03-07 12:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-28 19:16 [PATCH] openvswitch: Orphan frags before sending to userspace via Netlink to avoid guest stall Zoltan Kiss
2014-03-06 17:09 ` Zoltan Kiss
2014-03-07 4:46 ` Pravin Shelar
2014-03-07 12:29 ` Zoltan Kiss [this message]
[not found] ` <5319BBAE.7030109-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>
2014-03-07 17:38 ` Pravin Shelar
[not found] ` <CALnjE+rWc=n_F+1jSLQtPrgKSvvxONEkkYxWEHon2_KVNG9z3Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-07 15:58 ` Thomas Graf
[not found] ` <5319EC8E.2010606-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-03-07 17:19 ` Pravin Shelar
[not found] ` <CALnjE+oDM=ga_C6T_-9i2UNwv=K4g-+y-LJA04nh+=WmoeuNXw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-07 18:05 ` Thomas Graf
[not found] ` <531A0A5B.2000104-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-03-07 18:43 ` Pravin Shelar
[not found] ` <1393615016-9187-1-git-send-email-zoltan.kiss-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>
2014-03-07 16:23 ` Thomas Graf
[not found] ` <5319F272.1070101-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-03-07 17:28 ` Pravin Shelar
[not found] ` <CALnjE+q=fejHPsjVj9+jnypJCUHfCDFc553U48WR48Tjcf3FZw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-07 17:59 ` Thomas Graf
[not found] ` <531A0911.4040304-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-03-07 18:41 ` Pravin Shelar
2014-03-11 19:41 ` Zoltan Kiss
[not found] ` <531F66D0.1050000-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>
2014-03-14 22:26 ` Zoltan Kiss
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5319BBAE.7030109@citrix.com \
--to=zoltan.kiss@citrix.com \
--cc=dev@openvswitch.org \
--cc=jesse@nicira.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pshelar@nicira.com \
--cc=tgraf@redhat.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).