[PATCH v2 RESEND 1/2] mm/page_alloc: free order-0 pages through PCP in page_frag_free()

2018-11-19 Thread Aaron Lu
page_frag_free() calls __free_pages_ok() to free the page back to Buddy. This is OK for high order page, but for order-0 pages, it misses the optimization opportunity of using Per-Cpu-Pages and can cause zone lock contention when called frequently. Paweł Staszewski recently shared his result of 'h

[PATCH RESEND 0/2] free order-0 pages through PCP in page_frag_free() and cleanup

2018-11-19 Thread Aaron Lu
single function to free page https://lkml.kernel.org/r/20181106113149.gc24...@intel.com With some changelog rewording. Applies on top of v4.20-rc2-mmotm-2018-11-16-14-52. Aaron Lu (2): mm/page_alloc: free order-0 pages through PCP in page_frag_free() mm/page_alloc: use a single function to

[PATCH v3 RESEND 2/2] mm/page_alloc: use a single function to free page

2018-11-19 Thread Aaron Lu
There are multiple places of freeing a page, they all do the same things so a common function can be used to reduce code duplicate. It also avoids bug fixed in one function but left in another. Acked-by: Vlastimil Babka Signed-off-by: Aaron Lu --- mm/page_alloc.c | 37

Re: Kernel 4.19 network performance - forwarding/routing normal users traffic

2018-11-05 Thread Aaron Lu
On Mon, Nov 05, 2018 at 08:42:33AM +, Tariq Toukan wrote: > > On 03/11/2018 2:53 PM, Jesper Dangaard Brouer wrote: > > > > On Fri, 2 Nov 2018 22:20:24 +0800 Aaron Lu wrote: > >> > >> I think here is a problem - order 0 pages are freed directly to buddy

Re: Kernel 4.19 network performance - forwarding/routing normal users traffic

2018-11-04 Thread Aaron Lu
On Sat, Nov 03, 2018 at 01:53:25PM +0100, Jesper Dangaard Brouer wrote: > > On Fri, 2 Nov 2018 22:20:24 +0800 Aaron Lu wrote: > > > On Fri, Nov 02, 2018 at 12:40:37PM +0100, Jesper Dangaard Brouer wrote: > > > On Fri, 2 Nov 2018 13:23:56 +0800 > > > Aaron Lu wr

Re: Kernel 4.19 network performance - forwarding/routing normal users traffic

2018-11-02 Thread Aaron Lu
On Fri, Nov 02, 2018 at 12:40:37PM +0100, Jesper Dangaard Brouer wrote: > On Fri, 2 Nov 2018 13:23:56 +0800 > Aaron Lu wrote: > > > On Thu, Nov 01, 2018 at 08:23:19PM +, Saeed Mahameed wrote: > > > On Thu, 2018-11-01 at 23:27 +0800, Aaron Lu wrote: > > >

Re: Kernel 4.19 network performance - forwarding/routing normal users traffic

2018-11-01 Thread Aaron Lu
On Thu, Nov 01, 2018 at 08:23:19PM +, Saeed Mahameed wrote: > On Thu, 2018-11-01 at 23:27 +0800, Aaron Lu wrote: > > On Thu, Nov 01, 2018 at 10:22:13AM +0100, Jesper Dangaard Brouer > > wrote: > > ... ... > > > Section copied out: &

Re: Kernel 4.19 network performance - forwarding/routing normal users traffic

2018-11-01 Thread Aaron Lu
On Thu, Nov 01, 2018 at 10:22:13AM +0100, Jesper Dangaard Brouer wrote: ... ... > Section copied out: > > mlx5e_poll_tx_cq > | >--16.34%--napi_consume_skb > | > |--12.65%--__free_pages_ok > | | > |

Re: Page allocator bottleneck

2018-04-27 Thread Aaron Lu
On Mon, Apr 23, 2018 at 09:10:33PM +0800, Aaron Lu wrote: > On Mon, Apr 23, 2018 at 11:54:57AM +0300, Tariq Toukan wrote: > > Hi, > > > > I ran my tests with your patches. > > Initial BW numbers are significantly higher than I documented back then in > > this

Re: Page allocator bottleneck

2018-04-23 Thread Aaron Lu
On Mon, Apr 23, 2018 at 11:54:57AM +0300, Tariq Toukan wrote: > Hi, > > I ran my tests with your patches. > Initial BW numbers are significantly higher than I documented back then in > this mail-thread. > For example, in driver #2 (see original mail thread), with 6 rings, I now > get 92Gbps (sligh

Re: Page allocator bottleneck

2018-04-21 Thread Aaron Lu
Sorry to bring up an old thread... On Thu, Nov 02, 2017 at 07:21:09PM +0200, Tariq Toukan wrote: > > > On 18/09/2017 12:16 PM, Tariq Toukan wrote: > > > > > > On 15/09/2017 1:23 PM, Mel Gorman wrote: > > > On Thu, Sep 14, 2017 at 07:49:31PM +0300, Tariq Toukan wrote: > > > > Insights: Major de

Re: Page allocator bottleneck

2017-09-19 Thread Aaron Lu
On Mon, Sep 18, 2017 at 06:33:20PM +0300, Tariq Toukan wrote: > > > On 18/09/2017 10:44 AM, Aaron Lu wrote: > > On Mon, Sep 18, 2017 at 03:34:47PM +0800, Aaron Lu wrote: > > > On Sun, Sep 17, 2017 at 07:16:15PM +0300, Tariq Toukan wrote: > > > > >

Re: Page allocator bottleneck

2017-09-18 Thread Aaron Lu
On Mon, Sep 18, 2017 at 03:34:47PM +0800, Aaron Lu wrote: > On Sun, Sep 17, 2017 at 07:16:15PM +0300, Tariq Toukan wrote: > > > > It's nice to have the option to dynamically play with the parameter. > > But maybe we should also think of changing the default fraction gua

Re: Page allocator bottleneck

2017-09-18 Thread Aaron Lu
On Sun, Sep 17, 2017 at 07:16:15PM +0300, Tariq Toukan wrote: > > It's nice to have the option to dynamically play with the parameter. > But maybe we should also think of changing the default fraction guaranteed > to the PCP, so that unaware admins of networking servers would also benefit. I coll