[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <84fc211a-075d-44c7-a4c3-698931b6dc7c@redhat.com>
Date: Thu, 22 Feb 2024 09:51:00 +0100
From: David Hildenbrand <david@...hat.com>
To: Lance Yang <ioworker0@...il.com>, akpm@...ux-foundation.org
Cc: mhocko@...e.com, zokeefe@...gle.com, songmuchun@...edance.com,
shy828301@...il.com, peterx@...hat.com, minchan@...nel.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] mm/khugepaged: bypassing unnecessary scans with
MMF_DISABLE_THP check
On 22.02.24 08:51, Lance Yang wrote:
> Hey,
>
> On an Intel Core i5 CPU, the time taken by
> khugepaged to scan the address space of
> the process, which has been set with the
> MMF_DISABLE_THP flag after being added
> to the mm_slots list, is as follows (shorter is better):
>
> VMA Count | Old | New | Change
> ---------------------------------------
> 50 | 23us | 9us | -60.9%
> 100 | 32us | 9us | -71.9%
> 200 | 44us | 9us | -79.5%
> 400 | 75us | 9us | -88.0%
> 800 | 98us | 9us | -90.8%
>
> IIUC, once the count of VMAs for the process
> exceeds page_to_scan, khugepaged needs to
> wait for scan_sleep_millisecs ms before scanning
> the next process. IMO, unnecessary scans could
> actually be skipped with a very inexpensive
> mm->flags check in this case.
FWIW
Acked-by: David Hildenbrand <david@...hat.com>
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists