[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <779be6bf-db64-9175-f4c0-2baa0ea6defd@gmail.com>
Date: Tue, 3 Jul 2018 10:11:11 +0800
From: Jia He <hejianet@...il.com>
To: Michal Hocko <mhocko@...nel.org>
Cc: Russell King <linux@...linux.org.uk>,
Andrew Morton <akpm@...ux-foundation.org>,
Catalin Marinas <catalin.marinas@....com>,
Mel Gorman <mgorman@...e.de>,
Will Deacon <will.deacon@....com>,
Mark Rutland <mark.rutland@....com>,
"H. Peter Anvin" <hpa@...or.com>,
Pavel Tatashin <pasha.tatashin@...cle.com>,
Daniel Jordan <daniel.m.jordan@...cle.com>,
AKASHI Takahiro <takahiro.akashi@...aro.org>,
Gioh Kim <gi-oh.kim@...fitbricks.com>,
Steven Sistare <steven.sistare@...cle.com>,
Daniel Vacek <neelx@...hat.com>,
Eugeniu Rosca <erosca@...adit-jv.com>,
Vlastimil Babka <vbabka@...e.cz>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, James Morse <james.morse@....com>,
Ard Biesheuvel <ard.biesheuvel@...aro.org>,
Steve Capper <steve.capper@....com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Kate Stewart <kstewart@...uxfoundation.org>,
Philippe Ombredanne <pombredanne@...b.com>,
Johannes Weiner <hannes@...xchg.org>,
Kemi Wang <kemi.wang@...el.com>,
Petr Tesarik <ptesarik@...e.com>,
YASUAKI ISHIMATSU <yasu.isimatu@...il.com>,
Andrey Ryabinin <aryabinin@...tuozzo.com>,
Nikolay Borisov <nborisov@...e.com>, richard.weiyang@...il.com
Subject: Re: [PATCH v9 0/6] optimize memblock_next_valid_pfn and
early_pfn_valid on arm and arm64
On 7/2/2018 7:40 PM, Michal Hocko Wrote:
> On Fri 29-06-18 10:29:17, Jia He wrote:
>> Commit b92df1de5d28 ("mm: page_alloc: skip over regions of invalid pfns
>> where possible") tried to optimize the loop in memmap_init_zone(). But
>> there is still some room for improvement.
>
> It would be great to shortly describe those optimization from high level
> POV.
>
>>
>> Patch 1 introduce new config to make codes more generic
>> Patch 2 remain the memblock_next_valid_pfn on arm and arm64
>> Patch 3 optimizes the memblock_next_valid_pfn()
>> Patch 4~6 optimizes the early_pfn_valid()
>>
>> As for the performance improvement, after this set, I can see the time
>> overhead of memmap_init() is reduced from 27956us to 13537us in my
>> armv8a server(QDF2400 with 96G memory, pagesize 64k).
>
> So this is 13ms saving when booting 96G machine. Is this really worth
> the additional code? Are there any other benefits?
Sorry, Michal
I missed one thing.
This 13ms optimization is merely the result of my patch 3~6
Patch 1 is originated by Paul Burton in commit b92df1de5d289.
In its description,
===
James said "I have tested this patch on a virtual model of a Samurai CPU
with a sparse memory map. The kernel boot time drops from 109 to
62 seconds. "
===
--
Cheers,
Jia
> [...]
>> arch/arm/Kconfig | 4 +++
>> arch/arm/mm/init.c | 1 +
>> arch/arm64/Kconfig | 4 +++
>> arch/arm64/mm/init.c | 1 +
>> include/linux/early_pfn.h | 79 +++++++++++++++++++++++++++++++++++++++++++++++
>> include/linux/memblock.h | 2 ++
>> include/linux/mmzone.h | 18 ++++++++++-
>> mm/Kconfig | 3 ++
>> mm/memblock.c | 9 ++++++
>> mm/page_alloc.c | 5 ++-
>> 10 files changed, 124 insertions(+), 2 deletions(-)
>> create mode 100644 include/linux/early_pfn.h
>
Powered by blists - more mailing lists