Ask Your Question
2

When using alloc_pages(GFP_KERNEL | __GFP_COMP), is it ensured that a single TLB entry is allocated in the kernel driver for hugepages?

asked 2023-06-19 09:45:01 +0000

qstack gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-06-19 10:07:01 +0000

lakamha gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-06-19 09:45:01 +0000

Seen: 12 times

Last updated: Jun 19 '23