]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/khugepaged: sched to numa node when collapse huge page
authorBibo Mao <maobibo@loongson.cn>
Thu, 14 Apr 2022 19:16:43 +0000 (12:16 -0700)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Thu, 14 Apr 2022 21:49:49 +0000 (17:49 -0400)
commit86e6919e3c65a709ffaf12d8af4f1082991d961f
treed8b96bf48b8d679e21a2fbec70e44009338ee31e
parentd2a795b6a46516d08f93d9ebc6d1fcf289fb8632
mm/khugepaged: sched to numa node when collapse huge page

Collapsing a huge page will copy huge page from general small pages, dest
node is calculated from most one of source pages, however THP daemon is
not scheduled on dest node.  The performance may be poor since huge page
copying across nodes, also cache is not used for target node.  With this
patch, khugepaged daemon switches to the same numa node with huge page.
It saves copying time and makes use of local cache better.

With this patch, specint 2006 base performance is improved with 6% on
Loongson 3C5000L platform with 32 cores and 8 numa nodes.

Link: https://lkml.kernel.org/r/20220317065024.2635069-1-maobibo@loongson.cn
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Cc: David Hildenbrand <david@redhat.com>
Cc: Yang Shi <shy828301@gmail.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/khugepaged.c