[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160411214737.215c8e66@redhat.com>
Date: Mon, 11 Apr 2016 21:47:37 +0200
From: Jesper Dangaard Brouer <brouer@...hat.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: lsf@...ts.linux-foundation.org,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Brenden Blanco <bblanco@...mgrid.com>,
James Bottomley <James.Bottomley@...senPartnership.com>,
linux-mm <linux-mm@...ck.org>, Mel Gorman <mgorman@...e.de>,
Tom Herbert <tom@...bertland.com>,
lsf-pc@...ts.linux-foundation.org,
Mel Gorman <mgorman@...hsingularity.net>,
Alexei Starovoitov <alexei.starovoitov@...il.com>,
brouer@...hat.com, Alexander Duyck <alexander.duyck@...il.com>,
"Waskiewicz, PJ" <PJ.Waskiewicz@...app.com>
Subject: Re: [Lsf] [Lsf-pc] [LSF/MM TOPIC] Generic page-pool recycle
facility?
On Mon, 11 Apr 2016 09:53:54 -0700
Eric Dumazet <eric.dumazet@...il.com> wrote:
> On Mon, 2016-04-11 at 18:19 +0200, Jesper Dangaard Brouer wrote:
>
> > Drivers also do tricks where they fallback to smaller order pages. E.g.
> > lookup function mlx4_alloc_pages(). I've tried to simulate that
> > function here:
> > https://github.com/netoptimizer/prototype-kernel/blob/91d323fc53/kernel/mm/bench/page_bench01.c#L69
>
> We use order-0 pages on mlx4 at Google, as order-3 pages are very
> dangerous for some kind of attacks...
Interesting!
> An out of order TCP packet can hold an order-3 pages, while claiming to
> use 1.5 KBvia skb->truesize.
>
> order-0 only pages allow the page recycle trick used by Intel driver,
> and we hardly see any page allocations in typical workloads.
Yes, I looked at the Intel ixgbe drivers page recycle trick.
It is actually quite cool, but code wise it is a little hard to
follow. I started to look at the variant in i40e, specifically
function i40e_clean_rx_irq_ps() explains it a bit more explicit.
> While order-3 pages are 'nice' for friendly datacenter kind of
> traffic, they also are a higher risk on hosts connected to the wild
> Internet.
>
> Maybe I should upstream this patch ;)
Definitely!
Does this patch also include a page recycle trick? Else how do you get
around the cost of allocating a single order-0 page?
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
Author of http://www.iptv-analyzer.org
LinkedIn: http://www.linkedin.com/in/brouer
Powered by blists - more mailing lists