From: David Hildenbrand <david@redhat.com>
To: Florian Fainelli <f.fainelli@gmail.com>, Michal Hocko <mhocko@suse.com>
Cc: Vlastimil Babka <vbabka@suse.cz>, Mel Gorman <mgorman@suse.de>,
Minchan Kim <minchan@kernel.org>,
Johannes Weiner <hannes@cmpxchg.org>,
l.stach@pengutronix.de, LKML <linux-kernel@vger.kernel.org>,
Jaewon Kim <jaewon31.kim@samsung.com>,
Michal Nazarewicz <mina86@mina86.com>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Oscar Salvador <OSalvador@suse.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: alloc_contig_range() with MIGRATE_MOVABLE performance regression since 4.9
Date: Thu, 22 Apr 2021 20:35:27 +0200 [thread overview]
Message-ID: <9df905cf-cc4f-c739-26cb-c2e5c6e5a234@redhat.com> (raw)
In-Reply-To: <58726a6b-5468-a6b4-7c26-371ef5d71ee2@gmail.com>
On 22.04.21 19:50, Florian Fainelli wrote:
>
>
> On 4/22/2021 1:56 AM, David Hildenbrand wrote:
>> On 22.04.21 09:49, Michal Hocko wrote:
>>> Cc David and Oscar who are familiar with this code as well.
>>>
>>> On Wed 21-04-21 11:36:01, Florian Fainelli wrote:
>>>> Hi all,
>>>>
>>>> I have been trying for the past few days to identify the source of a
>>>> performance regression that we are seeing with the 5.4 kernel but not
>>>> with the 4.9 kernel on ARM64. Testing something newer like 5.10 is a bit
>>>> challenging at the moment but will happen eventually.
>>>>
>>>> What we are seeing is a ~3x increase in the time needed for
>>>> alloc_contig_range() to allocate 1GB in blocks of 2MB pages. The system
>>>> is idle at the time and there are no other contenders for memory other
>>>> than the user-space programs already started (DHCP client, shell, etc.).
>>
>> Hi,
>>
>> If you can easily reproduce it might be worth to just try bisecting;
>> that could be faster than manually poking around in the code.
>>
>> Also, it would be worth having a look at the state of upstream Linux.
>> Upstream Linux developers tend to not care about minor performance
>> regressions on oldish kernels.
>
> This is a big pain point here and I cannot agree more, but until we
> bridge that gap, this is not exactly easy to do for me unfortunately and
> neither is bisection :/
>
>>
>> There has been work on improving exactly the situation you are
>> describing -- a "fail fast" / "no retry" mode for alloc_contig_range().
>> Maybe it tackles exactly this issue.
>>
>> https://lkml.kernel.org/r/20210121175502.274391-3-minchan@kernel.org
>>
>> Minchan is already on cc.
>
> This patch does not appear to be helping, in fact, I had locally applied
> this patch from way back when:
>
> https://lkml.org/lkml/2014/5/28/113
>
> which would effectively do this unconditionally. Let me see if I can
> showcase this problem a x86 virtual machine operating in similar
> conditions to ours.
How exactly are you allocating these 2MiB blocks?
Via CMA->alloc_contig_range() or via alloc_contig_range() directly? I
assume via CMA.
For
https://lkml.kernel.org/r/20210121175502.274391-3-minchan@kernel.org
to do its work you'll have to pass __GFP_NORETRY to
alloc_contig_range(). This requires CMA adaptions, from where we call
alloc_contig_range().
--
Thanks,
David / dhildenb
next prev parent reply other threads:[~2021-04-22 18:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <dbdf7b8c-9165-f87c-92d4-cfb5a4f01221@gmail.com>
[not found] ` <YIEqpIOAyrs26soC@dhcp22.suse.cz>
2021-04-22 8:56 ` David Hildenbrand
2021-04-22 17:50 ` Florian Fainelli
2021-04-22 18:35 ` David Hildenbrand [this message]
2021-04-22 19:31 ` Florian Fainelli
2021-05-16 16:13 ` Florian Fainelli
2021-05-17 7:46 ` David Hildenbrand
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=9df905cf-cc4f-c739-26cb-c2e5c6e5a234@redhat.com \
--to=david@redhat.com \
--cc=OSalvador@suse.com \
--cc=f.fainelli@gmail.com \
--cc=hannes@cmpxchg.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=jaewon31.kim@samsung.com \
--cc=l.stach@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=mhocko@suse.com \
--cc=mina86@mina86.com \
--cc=minchan@kernel.org \
--cc=vbabka@suse.cz \
/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