Re: [PATCH mm-unstable v19 12/14] mm/khugepaged: avoid unnecessary mTHP collapse attempts
From: Lorenzo Stoakes <ljs@kernel.org>
Date: 2026-06-05 18:16:28
Also in:
linux-doc, linux-mm, lkml
From: Lorenzo Stoakes <ljs@kernel.org>
Date: 2026-06-05 18:16:28
Also in:
linux-doc, linux-mm, lkml
On Fri, Jun 05, 2026 at 07:49:34PM +0200, David Hildenbrand (Arm) wrote:
On 6/5/26 18:14, Nico Pache wrote:quoted
There are cases where, if an attempted collapse fails, all subsequent orders are guaranteed to also fail. Avoid these collapse attempts by bailing out early. Reviewed-by: Lorenzo Stoakes <ljs@kernel.org> Acked-by: Usama Arif <redacted> Acked-by: David Hildenbrand (Arm) <david@kernel.org> Signed-off-by: Nico Pache <npache@redhat.com> --- mm/khugepaged.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)diff --git a/mm/khugepaged.c b/mm/khugepaged.c index 430047316f43..7de92b28dd30 100644 --- a/mm/khugepaged.c +++ b/mm/khugepaged.c@@ -1499,6 +1499,7 @@ static enum scan_result mthp_collapse(struct mm_struct *mm, collapse_address = address + offset * PAGE_SIZE; ret = collapse_huge_page(mm, collapse_address, referenced, unmapped, cc, order); +Unrelated to this patch, but not the end of the world :)
NA....h that's fine ;)
-- Cheers, David
Cheers, Lorenzo