Re: [PATCH resend] mm: hugetlb_vmemmap: use bulk allocator in alloc_vmemmap_page_list()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 05, 2023 at 06:35:08PM +0800, Kefeng Wang wrote:
> It is needed 4095 pages(1G) or 7 pages(2M) to be allocated once in
> alloc_vmemmap_page_list(), so let's add a bulk allocator varietas
> alloc_pages_bulk_list_node() and switch alloc_vmemmap_page_list()
> to use it to accelerate page allocation.

Argh, no, please don't do this.

Iterating a linked list is _expensive_.  It is about 10x quicker to
iterate an array than a linked list.  Adding the list_head option
to __alloc_pages_bulk() was a colossal mistake.  Don't perpetuate it.

These pages are going into an array anyway.  Don't put them on a list
first.





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux