Re: [PATCH 2/3] mm: huge_memory: add thp_vma_disabled()

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

 



On 10.10.24 08:10, Kefeng Wang wrote:
Add thp_vma_disabled() helper to shared by shmem_allowable_huge_orders()
and __thp_vma_allowable_orders().

Signed-off-by: Kefeng Wang <wangkefeng.wang@xxxxxxxxxx>
---
  include/linux/huge_mm.h | 19 +++++++++++++++++++
  mm/huge_memory.c        | 13 +------------
  mm/shmem.c              |  7 +------
  3 files changed, 21 insertions(+), 18 deletions(-)

diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
index 795df660efa5..d77891332b35 100644
--- a/include/linux/huge_mm.h
+++ b/include/linux/huge_mm.h
@@ -309,6 +309,25 @@ struct thpsize {
  	(transparent_hugepage_flags &					\
  	 (1<<TRANSPARENT_HUGEPAGE_USE_ZERO_PAGE_FLAG))
+static inline bool thp_vma_disabled(struct vm_area_struct *vma,
+				    unsigned long vm_flags)
+{


I might need a patch like this for an independent fix, and the more I look at this the more I hate the separate vm_flags and the optional vma argument.

Let me try to improve things.

Long term we can get rid of the vm_flags, it just needs some madvise() massaging.

--
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