No, using the allocpages(GFPKERNEL | _GFPCOMP) function does not guarantee that a single TLB entry is allocated in the kernel driver for hugepages. This function only requests a contiguous block of memory pages with the specified flags. Whether or not this block of pages will be mapped to a single TLB entry depends on the specific implementation and configuration of the page tables and TLB in the system. For example, if the system has a large page size, the kernel may choose to map the block of pages to a single TLB entry. However, if the system has a small page size, the kernel may choose to map each individual page to a separate TLB entry.
Asked: 2023-06-19 09:45:01 +0000
Seen: 13 times
Last updated: Jun 19 '23