Re: [PATCH v2 0/5] Use nth_page() in place of direct struct page manipulation

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



On 6/9/23 17:03, Zi Yan wrote:
From: Zi Yan <ziy@xxxxxxxxxx>

On SPARSEMEM without VMEMMAP, struct page is not guaranteed to be
contiguous, since each memory section's memmap might be allocated
independently. hugetlb pages can go beyond a memory section size, thus
direct struct page manipulation on hugetlb pages/subpages might give
wrong struct page. Kernel provides nth_page() to do the manipulation
properly. Use that whenever code can see hugetlb pages.

How can we notice "whenever code can see hugetlb pages"?
From your series it seems you did a manual code audit, is that correct?
(I ask because I'm wondering about code scalability and catching other



[Index of Archives]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux