Re: [PATCH 3/8] mm: Add pmd_folio()

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

 



On 26.03.24 21:28, Matthew Wilcox (Oracle) wrote:
Convert directly from a pmd to a folio without going through another
representation first.  For now this is just a slightly shorter way to
write it, but it might end up being more efficient later.

Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>
---
  include/linux/pgtable.h | 2 ++
  mm/huge_memory.c        | 6 +++---
  mm/madvise.c            | 2 +-
  mm/mempolicy.c          | 2 +-
  mm/mlock.c              | 2 +-
  mm/userfaultfd.c        | 2 +-
  6 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h
index 600e17d03659..09c85c7bf9c2 100644
--- a/include/linux/pgtable.h
+++ b/include/linux/pgtable.h
@@ -50,6 +50,8 @@
  #define pmd_pgtable(pmd) pmd_page(pmd)
  #endif
+#define pmd_folio(pmd) page_folio(pmd_page(pmd))

Heh, I even used that on one of my recent patches and was sad not to find pud_folio(). ;)

Reviewed-by: David Hildenbrand <david@xxxxxxxxxx>

--
Cheers,

David / dhildenb





[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