On 05.11.24 13:56, Petr Vaněk wrote:
Hi David,
Hi Petr,
On Tue, Oct 22, 2024 at 11:07:55AM +0200, David Hildenbrand wrote:
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 9aea11b1477c..dfd6577225d8 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -78,19 +78,8 @@ bool hugepage_vma_check(struct vm_area_struct *vma, unsigned long vm_flags, if (!vma->vm_mm) /* vdso */ return false;
- /*
* Explicitly disabled through madvise or prctl, or some
* architectures may disable THP for some mappings, for
* example, s390 kvm.
* */
- if ((vm_flags & VM_NOHUGEPAGE) ||
test_bit(MMF_DISABLE_THP, &vma->vm_mm->flags))
return false;
- /*
* If the hardware/firmware marked hugepage support disabled.
*/
- if (transparent_hugepage_flags & (1 << TRANSPARENT_HUGEPAGE_UNSUPPORTED))
return false;
- if (thp_disabled_by_hw() || vma_thp_disabled(vma, vm_flags))
return 0;
Shouldn't this return false for consistency with the rest of the function?
Yes, that's better. Same applies to the 6.1.y backport of this.