Re: [External] Re: [PATCH v10 00/11] Free some vmemmap pages of HugeTLB page
From: Muchun Song
Date: Thu Dec 17 2020 - 10:53:53 EST
On Thu, Dec 17, 2020 at 11:00 PM Oscar Salvador <osalvador@xxxxxxx> wrote:
>
> On Thu, Dec 17, 2020 at 08:12:52PM +0800, Muchun Song wrote:
> > In this case, for the 1GB HugeTLB page, we can save 4088 pages(There are
> > 4096 pages for struct page structs, we reserve 2 pages for vmemmap and 8
> > pages for page tables. So we can save 4088 pages). This is a very substantial
> > gain. On our server, run some SPDK/QEMU applications which will use 1024GB
> > hugetlbpage. With this feature enabled, we can save ~16GB(1G hugepage)/~11GB
> > (2MB hugepage, the worst case is 10GB while the best is 12GB) memory.
>
> Is the above really true?
> We no longer need to allocate pagetables, so the savings go up to 4094, right?
Yeah, you are right. I forget to update this.
>
> I will be off for a few days but I expect to get back to this and review the
> missing bits when I am back.
>
Thanks.
> --
> Oscar Salvador
> SUSE L3
--
Yours,
Muchun