lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 29 May 2015 14:51:16 +0000
From:	Joao Martins <Joao.Martins@...lab.eu>
To:	"Yuzhou (C)" <vitas.yuzhou@...wei.com>
CC:	Wei Liu <wei.liu2@...rix.com>,
	"ian.campbell@...rix.com" <ian.campbell@...rix.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"david.vrabel@...rix.com" <david.vrabel@...rix.com>,
	"xen-devel@...ts.xenproject.org" <xen-devel@...ts.xenproject.org>,
	"boris.ostrovsky@...cle.com" <boris.ostrovsky@...cle.com>,
	"Luohao (brian)" <brian.luohao@...wei.com>,
	"Zhangleiqiang (Trump)" <zhangleiqiang@...wei.com>,
	Zhuangyuxin <zhuangyuxin@...wei.com>,
	"Xiaoding (B)" <xiaoding1@...wei.com>
Subject: Re: [Xen-devel] [RFC PATCH 00/13] Persistent grant maps for xen net
	drivers


On 29 May 2015, at 08:53, Yuzhou (C) <vitas.yuzhou@...wei.com> wrote:
> Hi,
> 
> 	About rx zerocopy, I have a question:
> 
> 	If some application make a socket, then listen and accept, the client sends packets to it, but it doesn't recv from this socket right now, all persistent grant page would be in used.
> So other application cannot receive any packets.  Is my guess right or wrong?

I believe that doesn’t happen: before the skb gets delivered to the protocol stack,
skb_orphan_frags gets called which releases the original pages (i.e. the persistent
grants) and memcpy to new ones (if the skb is fragmented). This happens because I
previously set the flag SKBTX_DEV_ZEROCOPY, which also invokes a callback
in such event.

Once the callback is invoked, the released pages are added a pool within
xen-netfront which later will use for new requests to the backend. Note that part
of the data is previously copied on pskb_pull_tail and may unref the initial frag
before skb_orphan_frags is called. The callback is still invoked and this page is added
to the pool as well.

Joao

> YuZhou
> 
> -----Original Message-----
> From: xen-devel-bounces@...ts.xen.org [mailto:xen-devel-bounces@...ts.xen.org] On Behalf Of Joao Martins
> Sent: Friday, May 22, 2015 6:27 PM
> To: Wei Liu
> Cc: ian.campbell@...rix.com; netdev@...r.kernel.org; david.vrabel@...rix.com; xen-devel@...ts.xenproject.org;boris.ostrovsky@...cle.com
> Subject: Re: [Xen-devel] [RFC PATCH 00/13] Persistent grant maps for xen net drivers
> 
> 
> On 19 May 2015, at 17:39, Wei Liu <wei.liu2@...rix.com> wrote:
> 
>> On Tue, May 12, 2015 at 07:18:24PM +0200, Joao Martins wrote:
>> 
>>> There have been recently[3] some discussions and issues raised on 
>>> persistent grants for the block layer, though the numbers above show 
>>> some significant improvements specially on more network intensive 
>>> workloads and provide a margin for comparison against future 
>>> map/unmap improvements.
>>> 
>>> Any comments or suggestions are welcome, Thanks!
>> 
>> Thanks, the numbers certainly look interesting.
>> 
>> I'm just a bit concerned about the complexity of netback. I've 
>> commented on individual patches, we can discuss the issues there.
> 
> Thanks a lot for the review! It does add more complexity, mainly for the TX path, but I also would like to mention that a portion of this changeset is also the persistent grants ops that could potentially live outside.
> 
> Joao
> 
>>> [1] http://article.gmane.org/gmane.linux.network/249383
>>> [2] http://bit.ly/1IhJfXD
>>> [3] 
>>> http://lists.xen.org/archives/html/xen-devel/2015-02/msg02292.html
>>> 
>>> Joao Martins (13):
>>> xen-netback: add persistent grant tree ops
>>> xen-netback: xenbus feature persistent support
>>> xen-netback: implement TX persistent grants
>>> xen-netback: implement RX persistent grants
>>> xen-netback: refactor xenvif_rx_action
>>> xen-netback: copy buffer on xenvif_start_xmit()
>>> xen-netback: add persistent tree counters to debugfs
>>> xen-netback: clone skb if skb->xmit_more is set
>>> xen-netfront: move grant_{ref,page} to struct grant
>>> xen-netfront: refactor claim/release grant
>>> xen-netfront: feature-persistent xenbus support
>>> xen-netfront: implement TX persistent grants
>>> xen-netfront: implement RX persistent grants
>>> 
>>> drivers/net/xen-netback/common.h    |  79 ++++
>>> drivers/net/xen-netback/interface.c |  78 +++-
>>> drivers/net/xen-netback/netback.c   | 873 ++++++++++++++++++++++++++++++------
>>> drivers/net/xen-netback/xenbus.c    |  24 +
>>> drivers/net/xen-netfront.c          | 362 ++++++++++++---
>>> 5 files changed, 1216 insertions(+), 200 deletions(-)
>>> 
>>> --
>>> 2.1.3
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@...ts.xen.org
> http://lists.xen.org/xen-devel

===================================================================
João Martins
Research Scientist, Networked Systems and Data Analytics Group

NEC Laboratories Europe
Kurfuerstenanlage 36
D-69115 Heidelberg

Tel.     +49 (0)6221 4342-208
Fax:     +49 (0)6221 4342-155
e-mail:  joao.martins@...lab.eu
===================================================================
NEC Europe Ltd | Registered Office: Athene, Odyssey Business Park,
West End Road, London, HA4 6QE, GB | Registered in England 2832014

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ