Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968331AbdIZJCy (ORCPT ); Tue, 26 Sep 2017 05:02:54 -0400 Received: from outboundhk.mxmail.xiaomi.com ([207.226.244.125]:11601 "EHLO xiaomi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S967311AbdIZJCt (ORCPT ); Tue, 26 Sep 2017 05:02:49 -0400 From: Hui Zhu To: , , , , , , CC: , Hui Zhu Subject: [RFC 2/2] Change limit of HighAtomic from 1% to 10% Date: Tue, 26 Sep 2017 16:46:44 +0800 Message-ID: <1506415604-4310-3-git-send-email-zhuhui@xiaomi.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1506415604-4310-1-git-send-email-zhuhui@xiaomi.com> References: <1506415604-4310-1-git-send-email-zhuhui@xiaomi.com> 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: 958 Lines: 27 After "Try to use HighAtomic if try to alloc umovable page that order is not 0". The result is still not very well because the the limit of HighAtomic make kernel cannot reserve more pageblock to HighAtomic. The patch change max_managed from 1% to 10% make HighAtomic can get more pageblocks. Signed-off-by: Hui Zhu --- mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index b54e94a..9322458 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -2101,7 +2101,7 @@ static void reserve_highatomic_pageblock(struct page *page, struct zone *zone, * Limit the number reserved to 1 pageblock or roughly 1% of a zone. * Check is race-prone but harmless. */ - max_managed = (zone->managed_pages / 100) + pageblock_nr_pages; + max_managed = (zone->managed_pages / 10) + pageblock_nr_pages; if (zone->nr_reserved_highatomic >= max_managed) return; -- 1.9.1