Re: Page allocator order-0 optimizations merged

2017-04-10 Thread zhong jiang
On 2017/4/10 23:10, Mel Gorman wrote: > On Mon, Apr 10, 2017 at 10:31:48PM +0800, zhong jiang wrote: >> Hi, Mel >> >> The patch I had test on arm64. I find the great degradation. I test it >> by micro-bench. >> The patrly data is as following. and it is stable. That stands for the >>

Re: Page allocator order-0 optimizations merged

2017-04-10 Thread Mel Gorman
On Mon, Apr 10, 2017 at 10:31:48PM +0800, zhong jiang wrote: > Hi, Mel > > The patch I had test on arm64. I find the great degradation. I test it > by micro-bench. > The patrly data is as following. and it is stable. That stands for the > allocate and free time. > What type of

Re: Page allocator order-0 optimizations merged

2017-04-10 Thread zhong jiang
On 2017/3/1 21:48, Jesper Dangaard Brouer wrote: > Hi NetDev community, > > I just wanted to make net driver people aware that this MM commit[1] got > merged and is available in net-next. > > commit 374ad05ab64d ("mm, page_alloc: only use per-cpu allocator for > irq-safe requests") > [1]

Re: Page allocator order-0 optimizations merged

2017-03-29 Thread Tariq Toukan
On 28/03/2017 9:24 PM, Jesper Dangaard Brouer wrote: On Tue, 28 Mar 2017 19:05:12 +0300 Tariq Toukan wrote: On 28/03/2017 10:32 AM, Tariq Toukan wrote: On 27/03/2017 4:32 PM, Mel Gorman wrote: On Mon, Mar 27, 2017 at 02:39:47PM +0200, Jesper Dangaard Brouer

Re: Page allocator order-0 optimizations merged

2017-03-28 Thread Jesper Dangaard Brouer
On Tue, 28 Mar 2017 19:05:12 +0300 Tariq Toukan wrote: > On 28/03/2017 10:32 AM, Tariq Toukan wrote: > > > > > > On 27/03/2017 4:32 PM, Mel Gorman wrote: > >> On Mon, Mar 27, 2017 at 02:39:47PM +0200, Jesper Dangaard Brouer wrote: > >>> On Mon, 27 Mar 2017 10:55:14

Re: Page allocator order-0 optimizations merged

2017-03-28 Thread Tariq Toukan
On 28/03/2017 10:32 AM, Tariq Toukan wrote: On 27/03/2017 4:32 PM, Mel Gorman wrote: On Mon, Mar 27, 2017 at 02:39:47PM +0200, Jesper Dangaard Brouer wrote: On Mon, 27 Mar 2017 10:55:14 +0200 Jesper Dangaard Brouer wrote: A possible solution, would be use the

Re: Page allocator order-0 optimizations merged

2017-03-28 Thread Pankaj Gupta
> > On Mon, Mar 27, 2017 at 02:39:47PM +0200, Jesper Dangaard Brouer wrote: > > On Mon, 27 Mar 2017 10:55:14 +0200 > > Jesper Dangaard Brouer wrote: > > > > > A possible solution, would be use the local_bh_{disable,enable} instead > > > of the {preempt_disable,enable} calls.

Re: Page allocator order-0 optimizations merged

2017-03-28 Thread Jesper Dangaard Brouer
On Tue, 28 Mar 2017 10:32:19 +0300 Tariq Toukan wrote: > On 27/03/2017 4:32 PM, Mel Gorman wrote: > > On Mon, Mar 27, 2017 at 02:39:47PM +0200, Jesper Dangaard Brouer wrote: > >> On Mon, 27 Mar 2017 10:55:14 +0200 > >> Jesper Dangaard Brouer wrote:

Re: Page allocator order-0 optimizations merged

2017-03-28 Thread Tariq Toukan
On 27/03/2017 4:32 PM, Mel Gorman wrote: On Mon, Mar 27, 2017 at 02:39:47PM +0200, Jesper Dangaard Brouer wrote: On Mon, 27 Mar 2017 10:55:14 +0200 Jesper Dangaard Brouer wrote: A possible solution, would be use the local_bh_{disable,enable} instead of the

Re: Page allocator order-0 optimizations merged

2017-03-27 Thread Jesper Dangaard Brouer
On Mon, 27 Mar 2017 07:15:18 -0700 Matthew Wilcox wrote: > On Mon, Mar 27, 2017 at 02:39:47PM +0200, Jesper Dangaard Brouer wrote: > > > > +static __always_inline int in_irq_or_nmi(void) > > +{ > > + return in_irq() || in_nmi(); > > +// XXX: hoping compiler will optimize

Re: Page allocator order-0 optimizations merged

2017-03-27 Thread Matthew Wilcox
On Mon, Mar 27, 2017 at 02:39:47PM +0200, Jesper Dangaard Brouer wrote: > > +static __always_inline int in_irq_or_nmi(void) > +{ > + return in_irq() || in_nmi(); > +// XXX: hoping compiler will optimize this (todo verify) into: > +// #define in_irq_or_nmi() (preempt_count() & (HARDIRQ_MASK

Re: Page allocator order-0 optimizations merged

2017-03-27 Thread Mel Gorman
On Mon, Mar 27, 2017 at 02:39:47PM +0200, Jesper Dangaard Brouer wrote: > On Mon, 27 Mar 2017 10:55:14 +0200 > Jesper Dangaard Brouer wrote: > > > A possible solution, would be use the local_bh_{disable,enable} instead > > of the {preempt_disable,enable} calls. But it is

Re: Page allocator order-0 optimizations merged

2017-03-27 Thread Jesper Dangaard Brouer
On Mon, 27 Mar 2017 10:55:14 +0200 Jesper Dangaard Brouer wrote: > A possible solution, would be use the local_bh_{disable,enable} instead > of the {preempt_disable,enable} calls. But it is slower, using numbers > from [1] (19 vs 11 cycles), thus the expected cycles saving is

Re: Page allocator order-0 optimizations merged

2017-03-27 Thread Mel Gorman
On Mon, Mar 27, 2017 at 10:55:14AM +0200, Jesper Dangaard Brouer wrote: > On Mon, 27 Mar 2017 03:32:47 -0400 (EDT) > Pankaj Gupta wrote: > > > Hello, > > > > It looks like a race with softirq and normal process context. > > > > Just thinking if we really want allocations

Re: Page allocator order-0 optimizations merged

2017-03-27 Thread Jesper Dangaard Brouer
On Mon, 27 Mar 2017 03:32:47 -0400 (EDT) Pankaj Gupta wrote: > Hello, > > It looks like a race with softirq and normal process context. > > Just thinking if we really want allocations from 'softirqs' to be > done using per cpu list? Yes, softirq need fast page allocs. The

Re: Page allocator order-0 optimizations merged

2017-03-27 Thread Pankaj Gupta
Hello, It looks like a race with softirq and normal process context. Just thinking if we really want allocations from 'softirqs' to be done using per cpu list? Or we can have some check in 'free_hot_cold_page' for softirqs to check if we are on a path of returning from hard interrupt don't

Re: Page allocator order-0 optimizations merged

2017-03-26 Thread Tariq Toukan
On 26/03/2017 11:21 AM, Tariq Toukan wrote: On 23/03/2017 4:51 PM, Mel Gorman wrote: On Thu, Mar 23, 2017 at 02:43:47PM +0100, Jesper Dangaard Brouer wrote: On Wed, 22 Mar 2017 23:40:04 + Mel Gorman wrote: On Wed, Mar 22, 2017 at 07:39:17PM +0200, Tariq

Re: Page allocator order-0 optimizations merged

2017-03-26 Thread Tariq Toukan
On 23/03/2017 4:51 PM, Mel Gorman wrote: On Thu, Mar 23, 2017 at 02:43:47PM +0100, Jesper Dangaard Brouer wrote: On Wed, 22 Mar 2017 23:40:04 + Mel Gorman wrote: On Wed, Mar 22, 2017 at 07:39:17PM +0200, Tariq Toukan wrote: This modification may slow

Re: Page allocator order-0 optimizations merged

2017-03-23 Thread Mel Gorman
On Thu, Mar 23, 2017 at 02:43:47PM +0100, Jesper Dangaard Brouer wrote: > On Wed, 22 Mar 2017 23:40:04 + > Mel Gorman wrote: > > > On Wed, Mar 22, 2017 at 07:39:17PM +0200, Tariq Toukan wrote: > > > > > > This modification may slow allocations from IRQ context

Re: Page allocator order-0 optimizations merged

2017-03-23 Thread Jesper Dangaard Brouer
On Wed, 22 Mar 2017 23:40:04 + Mel Gorman wrote: > On Wed, Mar 22, 2017 at 07:39:17PM +0200, Tariq Toukan wrote: > > > > > This modification may slow allocations from IRQ context slightly > > > > > but the > > > > > main gain from the per-cpu allocator is that it

Re: Page allocator order-0 optimizations merged

2017-03-22 Thread Mel Gorman
On Wed, Mar 22, 2017 at 07:39:17PM +0200, Tariq Toukan wrote: > > > > This modification may slow allocations from IRQ context slightly > > > > but the > > > > main gain from the per-cpu allocator is that it scales better for > > > > allocations from multiple contexts. There is an implicit > > > >

Re: Page allocator order-0 optimizations merged

2017-03-22 Thread Tariq Toukan
On 01/03/2017 7:36 PM, Tariq Toukan wrote: On 01/03/2017 3:48 PM, Jesper Dangaard Brouer wrote: Hi NetDev community, I just wanted to make net driver people aware that this MM commit[1] got merged and is available in net-next. commit 374ad05ab64d ("mm, page_alloc: only use per-cpu

Re: Page allocator order-0 optimizations merged

2017-03-01 Thread Tariq Toukan
On 01/03/2017 3:48 PM, Jesper Dangaard Brouer wrote: Hi NetDev community, I just wanted to make net driver people aware that this MM commit[1] got merged and is available in net-next. commit 374ad05ab64d ("mm, page_alloc: only use per-cpu allocator for irq-safe requests") [1]

Page allocator order-0 optimizations merged

2017-03-01 Thread Jesper Dangaard Brouer
Hi NetDev community, I just wanted to make net driver people aware that this MM commit[1] got merged and is available in net-next. commit 374ad05ab64d ("mm, page_alloc: only use per-cpu allocator for irq-safe requests") [1] https://git.kernel.org/davem/net-next/c/374ad05ab64d696 It provides