linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mel Gorman <mgorman@techsingularity.net>
To: Jesper Dangaard Brouer <brouer@redhat.com>
Cc: akpm@linux-foundation.org, willy@infradead.org,
	peterz@infradead.org, pagupta@redhat.com,
	ttoukan.linux@gmail.com, tariqt@mellanox.com,
	netdev@vger.kernel.org, saeedm@mellanox.com,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] mm, page_alloc: re-enable softirq use of per-cpu page allocator
Date: Tue, 11 Apr 2017 09:23:35 +0100	[thread overview]
Message-ID: <20170411082335.i3t4fysi2rw5iydd@techsingularity.net> (raw)
In-Reply-To: <20170410225302.2ec8cf56@redhat.com>

On Mon, Apr 10, 2017 at 10:53:02PM +0200, Jesper Dangaard Brouer wrote:
> 
> I will appreciate review of this patch.

I had reviewed it but didn't have much to say other than the in_interrupt()
is inconvenient rather than wrong.

> My micro-benchmarking show we
> basically return to same page alloc+free cost as before 374ad05ab64d
> ("mm, page_alloc: only use per-cpu allocator for irq-safe requests").
> Which sort of invalidates this attempt of optimizing the page allocator.
> But Mel's micro-benchmarks still show an improvement.
> 

Which could be down to differences in CPUs.

> Notice the slowdown comes from me checking irqs_disabled() ... if
> someone can spot a way to get rid of that this, then this patch will be
> a win.
> 

I didn't spot an easy way of doing it. One approach which would be lighter,
if somewhat surprising, is to put a lock into the per-cpu structures that
is *not* IRQ-safe and trylock it for the per-cpu allocator. If it's !irq
allocation, it'll be uncontended. If it's an irq-allocation and contended,
it means that CPU has re-entered the allocator and must use the irq-safe
buddy lists. That would mean that for the uncontended case, both irq-safe
and irq-unsafe allocations could use the list and in the contended case, irq
allocations will still succeed. However, it would need careful development,
testing and review and not appropriate to wedge in as a fix late in the
rc cycle.

> I'm traveling out of Montreal today, and will rerun my benchmarks when
> I get home.  Tariq will also do some more testing with 100G NIC (he
> also participated in the Montreal conf, so he is likely in transit too).
> 

Rerun them please. If there is a problem or any doubt then I'll post the
revert and try this again outside of an rc cycle. That would be preferable
to releasing 4.11 with a known regression.

-- 
Mel Gorman
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2017-04-11  8:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-10 15:08 Mel Gorman
2017-04-10 20:53 ` Jesper Dangaard Brouer
2017-04-11  8:23   ` Mel Gorman [this message]
2017-04-10 21:26 ` Andrew Morton
2017-04-14 10:10   ` Jesper Dangaard Brouer
2017-04-15 15:03     ` Mel Gorman

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=20170411082335.i3t4fysi2rw5iydd@techsingularity.net \
    --to=mgorman@techsingularity.net \
    --cc=akpm@linux-foundation.org \
    --cc=brouer@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=netdev@vger.kernel.org \
    --cc=pagupta@redhat.com \
    --cc=peterz@infradead.org \
    --cc=saeedm@mellanox.com \
    --cc=tariqt@mellanox.com \
    --cc=ttoukan.linux@gmail.com \
    --cc=willy@infradead.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