From: "bhe@redhat.com" <bhe@redhat.com>
To: Rahul Gopakumar <gopakumarr@vmware.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"natechancellor@gmail.com" <natechancellor@gmail.com>,
"ndesaulniers@google.com" <ndesaulniers@google.com>,
"clang-built-linux@googlegroups.com"
<clang-built-linux@googlegroups.com>,
"rostedt@goodmis.org" <rostedt@goodmis.org>,
Rajender M <manir@vmware.com>, Yiu Cho Lau <lauyiuch@vmware.com>,
Peter Jonasson <pjonasson@vmware.com>,
Venkatesh Rajaram <rajaramv@vmware.com>
Subject: Re: Performance regressions in "boot_time" tests in Linux 5.8 Kernel
Date: Sat, 10 Oct 2020 14:11:24 +0800 [thread overview]
Message-ID: <20201010061124.GE25604@MiWiFi-R3L-srv> (raw)
In-Reply-To: <DM6PR05MB52921FF90FA01CC337DD23A1A4080@DM6PR05MB5292.namprd05.prod.outlook.com>
On 10/09/20 at 01:15pm, Rahul Gopakumar wrote:
> As part of VMware's performance regression testing for Linux Kernel
> upstream releases, we identified boot time increase when comparing
> Linux 5.8 kernel against Linux 5.7 kernel. Increase in boot time is
> noticeable on VM with a **large amount of memory**.
>
> In our test cases, it's noticeable with memory 1TB and more, whereas
> there was no major difference noticed in testcases with <1TB.
>
> On bisecting between 5.7 and 5.8, we found the following commit from
> “Baoquan He” to be the cause of boot time increase in big VM test cases.
>
> -------------------------------------
>
> commit 73a6e474cb376921a311786652782155eac2fdf0
> Author: Baoquan He <bhe@redhat.com>
> Date: Wed Jun 3 15:57:55 2020 -0700
>
> mm: memmap_init: iterate over memblock regions rather that check each PFN
>
> When called during boot the memmap_init_zone() function checks if each PFN
> is valid and actually belongs to the node being initialized using
> early_pfn_valid() and early_pfn_in_nid().
>
> Each such check may cost up to O(log(n)) where n is the number of memory
> banks, so for large amount of memory overall time spent in early_pfn*()
> becomes substantial.
>
> -------------------------------------
>
> For boot time test, we used RHEL 8.1 as the guest OS.
> VM config is 84 vcpu and 1TB vRAM.
>
> Here are the actual performance numbers.
>
> 5.7 GA - 18.17 secs
> Baoquan's commit - 21.6 secs (-16% increase in time)
>
> From dmesg logs, we can see significant time delay around memmap.
>
> Refer below logs.
>
> Good commit
>
> [0.033176] Normal zone: 1445888 pages used for memmap
> [0.033176] Normal zone: 89391104 pages, LIFO batch:63
> [0.035851] ACPI: PM-Timer IO Port: 0x448
>
> Problem commit
>
> [0.026874] Normal zone: 1445888 pages used for memmap
> [0.026875] Normal zone: 89391104 pages, LIFO batch:63
> [2.028450] ACPI: PM-Timer IO Port: 0x448
Could you add memblock=debug to kernel cmdline and paste the boot logs of
system w and w/o the commit?
>
> We did some analysis, and it looks like with the problem commit it's
> not deferring the memory initialization to a later stage and it's
> initializing the huge chunk of memory in serial - during the boot-up
> time. Whereas with the good commit, it was able to defer the
> initialization of the memory when it could be done in parallel.
>
>
> Rahul Gopakumar
> Performance Engineering
> VMware, Inc.
>
next prev parent reply other threads:[~2020-10-10 6:11 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-09 13:15 Rahul Gopakumar
2020-10-10 6:11 ` bhe [this message]
2020-10-12 17:21 ` Rahul Gopakumar
2020-10-13 5:08 ` bhe
2020-10-13 13:17 ` bhe
2020-10-20 13:45 ` Rahul Gopakumar
2020-10-20 15:18 ` bhe
2020-10-20 15:26 ` Rahul Gopakumar
2020-10-22 4:04 ` bhe
2020-10-22 17:21 ` Rahul Gopakumar
2020-11-02 14:15 ` Rahul Gopakumar
2020-11-02 14:30 ` bhe
2020-11-03 12:34 ` Rahul Gopakumar
2020-11-03 14:03 ` bhe
2020-11-12 14:51 ` bhe
2020-11-20 3:11 ` Rahul Gopakumar
2020-11-22 1:08 ` bhe
2020-11-24 15:03 ` Rahul Gopakumar
2020-11-30 16:55 ` Mike Rapoport
2020-12-11 16:16 ` Rahul Gopakumar
2020-12-13 15:15 ` bhe
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=20201010061124.GE25604@MiWiFi-R3L-srv \
--to=bhe@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=clang-built-linux@googlegroups.com \
--cc=gopakumarr@vmware.com \
--cc=lauyiuch@vmware.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=manir@vmware.com \
--cc=natechancellor@gmail.com \
--cc=ndesaulniers@google.com \
--cc=pjonasson@vmware.com \
--cc=rajaramv@vmware.com \
--cc=rostedt@goodmis.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