Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967464AbdIZJCr (ORCPT ); Tue, 26 Sep 2017 05:02:47 -0400 Received: from outboundhk.mxmail.xiaomi.com ([207.226.244.125]:11352 "EHLO xiaomi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S967311AbdIZJCp (ORCPT ); Tue, 26 Sep 2017 05:02:45 -0400 X-Greylist: delayed 902 seconds by postgrey-1.27 at vger.kernel.org; Tue, 26 Sep 2017 05:02:44 EDT From: Hui Zhu To: , , , , , , CC: , Hui Zhu Subject: [RFC 0/2] Use HighAtomic against long-term fragmentation Date: Tue, 26 Sep 2017 16:46:42 +0800 Message-ID: <1506415604-4310-1-git-send-email-zhuhui@xiaomi.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.235.171.212] X-ClientProxiedBy: CNCAS3.mioffice.cn (10.237.8.133) To cnbox6.mioffice.cn (10.237.8.146) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3696 Lines: 77 Current HighAtomic just to handle the high atomic page alloc. But I found that use it handle the normal unmovable continuous page alloc will help to against long-term fragmentation. Use highatomic as normal page alloc is odd. But I really got some good results with our internal test and mmtests. Do you think it is worth to work on it? The patches was tested with mmtests stress-highalloc modified to do GFP_KERNEL order-4 allocations, on 4.14.0-rc1+ 2 cpus Vbox 1G memory. orig ch Minor Faults 45659477 43315623 Major Faults 319 371 Swap Ins 0 0 Swap Outs 0 0 Allocation stalls 0 0 DMA allocs 93518 18345 DMA32 allocs 42395699 40406865 Normal allocs 0 0 Movable allocs 0 0 Direct pages scanned 7056 16232 Kswapd pages scanned 946174 961750 Kswapd pages reclaimed 945077 942821 Direct pages reclaimed 7022 16170 Kswapd efficiency 99% 98% Kswapd velocity 1576.352 1567.977 Direct efficiency 99% 99% Direct velocity 11.755 26.464 Percentage direct scans 0% 1% Zone normal velocity 1588.108 1594.441 Zone dma32 velocity 0.000 0.000 Zone dma velocity 0.000 0.000 Page writes by reclaim 0.000 0.000 Page writes file 0 0 Page writes anon 0 0 Page reclaim immediate 405 16429 Sector Reads 2027848 2109324 Sector Writes 3386260 3299388 Page rescued immediate 0 0 Slabs scanned 867805 877005 Direct inode steals 337 2072 Kswapd inode steals 33911 41777 Kswapd skipped wait 0 0 THP fault alloc 30 84 THP collapse alloc 188 244 THP splits 0 0 THP fault fallback 67 51 THP collapse fail 6 4 Compaction stalls 111 49 Compaction success 81 35 Compaction failures 30 14 Page migrate success 57962 43921 Page migrate failure 67 183 Compaction pages isolated 117473 88823 Compaction migrate scanned 75548 50403 Compaction free scanned 1454638 672310 Compaction cost 62 47 NUMA alloc hit 42129493 40018326 NUMA alloc miss 0 0 NUMA interleave hit 0 0 NUMA alloc local 42129493 40018326 NUMA base PTE updates 0 0 NUMA huge PMD updates 0 0 NUMA page range updates 0 0 NUMA hint faults 0 0 NUMA hint local faults 0 0 NUMA hint local percent 100 100 NUMA pages migrated 0 0 AutoNUMA cost 0% 0% Hui Zhu (2): Try to use HighAtomic if try to alloc umovable page that order is not 0 Change limit of HighAtomic from 1% to 10% page_alloc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)