[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <53B87FC1-5854-4E54-B28F-C13D3EA662C3@linux.dev>
Date: Thu, 14 Sep 2023 10:45:38 +0800
From: Muchun Song <muchun.song@...ux.dev>
To: Usama Arif <usama.arif@...edance.com>
Cc: Linux-MM <linux-mm@...ck.org>,
Mike Kravetz <mike.kravetz@...cle.com>,
"Mike Rapoport (IBM)" <rppt@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
Muchun Song <songmuchun@...edance.com>,
fam.zheng@...edance.com, liangma@...ngbit.com,
punit.agrawal@...edance.com
Subject: Re: [v5 4/4] mm: hugetlb: Skip initialization of gigantic tail struct
pages if freed by HVO
> On Sep 13, 2023, at 18:54, Usama Arif <usama.arif@...edance.com> wrote:
>
> The new boot flow when it comes to initialization of gigantic pages
> is as follows:
> - At boot time, for a gigantic page during __alloc_bootmem_hugepage,
> the region after the first struct page is marked as noinit.
> - This results in only the first struct page to be
> initialized in reserve_bootmem_region. As the tail struct pages are
> not initialized at this point, there can be a significant saving
> in boot time if HVO succeeds later on.
> - Later on in the boot, the head page is prepped and the first
> HUGETLB_VMEMMAP_RESERVE_SIZE / sizeof(struct page) - 1 tail struct pages
> are initialized.
> - HVO is attempted. If it is not successful, then the rest of the
> tail struct pages are initialized. If it is successful, no more
> tail struct pages need to be initialized saving significant boot time.
>
> The WARN_ON for increased ref count in gather_bootmem_prealloc was changed
> to a VM_BUG_ON. This is OK as there should be no speculative references
> this early in boot process. The VM_BUG_ON's are there just in case such code
> is introduced.
>
> Signed-off-by: Usama Arif <usama.arif@...edance.com>
Reviewed-by: Muchun Song <songmuchun@...edance.com>
Thanks for your work.
Powered by blists - more mailing lists