On 6 Sep 2018, at 6:59, Vlastimil Babka wrote: > On 08/30/2018 12:54 AM, Zi Yan wrote: >> >> Thanks for your patch. >> >> I tested it against Linus’s tree with “memhog -r3 130g” in a two-socket machine with 128GB memory on >> each node and got the results below. I expect this test should fill one node, then fall back to the other. >> >> 1. madvise(MADV_HUGEPAGE) + defrag = {always, madvise, defer+madvise}: no swap, THPs are allocated in the fallback node. >> 2. madvise(MADV_HUGEPAGE) + defrag = defer: pages got swapped to the disk instead of being allocated in the fallback node. > > Hmm this is GFP_TRANSHUGE_LIGHT | __GFP_KSWAPD_RECLAIM | __GFP_THISNODE. > No direct reclaim, so it would have to be kswapd causing the swapping? I > wouldn't expect it to be significant and over-reclaiming. What exactly > is your definition of "pages got swapped"? About 4GB pages are swapped to the disk (my swap disk size is 4.7GB). My machine has 128GB memory in each node and memhog uses 130GB memory. When one node is filled up, the oldest pages are swapped into disk until memhog finishes touching all 130GB memory. — Best Regards, Yan Zi
Attachment:
signature.asc
Description: OpenPGP digital signature