History

mm: hugetlb: move mpol interpretation out of alloc_buddy_hugetlb_folio_with_mpol()

Move memory policy interpretation out of alloc_buddy_hugetlb_folio_with_mpol() and into alloc_hugetlb_folio() to separate reading and interpretation of memory policy from actual allocation. This will later allow memory policy to be interpreted outside of the process of allocating a hugetlb folio entirely. This opens doors for other callers of the HugeTLB folio allocation function, such as guest_memfd, where memory may not always be mapped and hence may not have an associated vma. Introduce struct mempolicy_interpreted to hold all the components of an interpreted memory policy. Rename alloc_buddy_hugetlb_folio_with_mpol() to alloc_buddy_hugetlb_folio() since the function no longer interprets memory policy. No functional change intended.

Ackerley Tng committed 4 months ago

Commit 66a4e9e1 parent 88819612 files · +37 −19Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/linux/mempolicy.h+1−1
@@ -16,7 +16,7 @@ · 15 unmodified lines
1616 */
1717
1818 /* Policies */
19−enum {
19+enum mempolicy_mode {
2020 MPOL_DEFAULT,
2121 MPOL_PREFERRED,
2222 MPOL_BIND,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t