From patchwork Fri Dec 1 07:25:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: zhiguojiang X-Patchwork-Id: 13475499 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D993C10DC1 for ; Fri, 1 Dec 2023 07:25:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CFDCB8D0025; Fri, 1 Dec 2023 02:25:37 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CADB38D0001; Fri, 1 Dec 2023 02:25:37 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B4DE78D0025; Fri, 1 Dec 2023 02:25:37 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id A54E08D0001 for ; Fri, 1 Dec 2023 02:25:37 -0500 (EST) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 7A5B6A00BD for ; Fri, 1 Dec 2023 07:25:37 +0000 (UTC) X-FDA: 81517414314.25.DEE3630 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2092.outbound.protection.outlook.com [40.107.215.92]) by imf03.hostedemail.com (Postfix) with ESMTP id 3D14D20021 for ; Fri, 1 Dec 2023 07:25:33 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=vivo.com header.s=selector2 header.b=ps4fdZTY; spf=pass (imf03.hostedemail.com: domain of justinjiang@vivo.com designates 40.107.215.92 as permitted sender) smtp.mailfrom=justinjiang@vivo.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=quarantine) header.from=vivo.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1701415534; a=rsa-sha256; cv=pass; b=gmWI+EQLjFHxqQPRThK8P/hjkR09CbHT53CZj09D0J7dAubdZxkSTOJxTBLDsW5W49vvi1 gUhcBF8faWvAdLSdgdubItsPPqshlxIC4VOFk1W8YpOrRgHiZzdZYnYJ5e0/ddQnIAjs72 h+MnUkKgrI46sQMJaP3ffBfpFL3qjdI= ARC-Authentication-Results: i=2; imf03.hostedemail.com; dkim=pass header.d=vivo.com header.s=selector2 header.b=ps4fdZTY; spf=pass (imf03.hostedemail.com: domain of justinjiang@vivo.com designates 40.107.215.92 as permitted sender) smtp.mailfrom=justinjiang@vivo.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=quarantine) header.from=vivo.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1701415534; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=tI8oEPip3Q7kwfhovo59YbyVALnN/SAlZobRe3NHgcI=; b=cjNQUSvWgNjM8/6iYFIuhWgnHNNSqqTNHg/XM2tfWn5DFMuRve6EchSjZWAZWqqzE9qwMc i2NSgNnRWcvCTh+MLoBGPf/lvW7TQcQ9JxqxXI9XsNJ+qNTmyTpA8OvDrAfiF+tjTUX/Lz vYsjVoW9wOd8YYRwPZIlbxWveYzNJSU= ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gg7BiY+oXS39jK4AuuQBimVu0gYVmKYtAQ6cd/jc+wfPQ78+9oMRXHkq2vT5VV3+b0mGe4naID50uGfCJ8HHbjbg+98q2meyBr4j+zcDtgOfI/J/uhSASObezBjF2i5w0MiZEs75SOmPJy7K42J1jSQQaFlH767v42PyW8j6dqhrYw7hOzFlu9pyaV0O6b5ipqbBHm7ypmD2e8U9AiW+llJRLrQ+vYLHI6p1JCZ7VN5ZU/UTXpsiLb1Oil24Ar6Pflba2gt+jAXE7cH66CZ65yWcCyHENipGfPOG396E/sdQUgXLFadU+T1vzzrukLUuULRyW4uivTMqQ9gIenTRmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tI8oEPip3Q7kwfhovo59YbyVALnN/SAlZobRe3NHgcI=; b=S0YtpLEoLevdg5AXea2JUgFeRElPdciPSVBDhby9HX3g2VUsydYBFJW5FUX4bDB/G8uxuh//QkZgV0KtWSmrZqfqEyucuRs/YLdwwLVQ8URqLIO+p7rFej7sl5ET77ZDPSG0SXNMMqwv36rQ5uXy5CMEeMuUzq0YiLyTIQqBgthHA9fGI0zDu6669L8GwndirWLPelwjYcpOMSUWHbIkYfm0lwsqB4Y/ieBg0GybvZ2Ui8YTuetciHXiYPIWU1m1+ONuY5YG6OUpRGO+OSuspYxDe6BuFRu2dAHUKge+ajMxnXIMIz8T4eurLPXhjAfAy/QSiDuGh0kQt+ZcYhXPbA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tI8oEPip3Q7kwfhovo59YbyVALnN/SAlZobRe3NHgcI=; b=ps4fdZTY6t7974ttrIu1t6CVC5jFLKqldhASi2o6uFwIgPeXF0dxWT5AjiB8ZO/o3P548BigjhaziewY4cvTlqaYuoWgmlRsru1krkDZO+y8b0iCSV/ZgxGtdWcHetEYn7J9Te0QNcY/i4jK6KxyXsSRqJZKlZJ2Gs0++qOUx2/hg2/muwh/Lh3P8uvaJ4xRDW5yXdhKk4bGOnmAS7AUmH1KHB/J66igI8WJ+PRMY4r95nX6OKPGGhHfvPCL+e7BS/MhhTmyklrAFyKkdPbmbW/lWd+rVomXu0o0IPJt2P2cJumZ32grLUEJsA6I6x6zbymKzcEIK+v/es7JKqz7SQ== Received: from JH0PR06MB6849.apcprd06.prod.outlook.com (2603:1096:990:47::12) by PSAPR06MB4166.apcprd06.prod.outlook.com (2603:1096:301:32::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.26; Fri, 1 Dec 2023 07:25:27 +0000 Received: from JH0PR06MB6849.apcprd06.prod.outlook.com ([fe80::1be0:ebf0:eb04:6bd3]) by JH0PR06MB6849.apcprd06.prod.outlook.com ([fe80::1be0:ebf0:eb04:6bd3%4]) with mapi id 15.20.7046.015; Fri, 1 Dec 2023 07:25:27 +0000 From: Zhiguo Jiang To: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: opensource.kernel@vivo.com, Zhiguo Jiang Subject: [PATCH] mm: ALLOC_HIGHATOMIC flag allocation issue Date: Fri, 1 Dec 2023 15:25:18 +0800 Message-ID: <20231201072518.1974-1-justinjiang@vivo.com> X-Mailer: git-send-email 2.41.0.windows.3 X-ClientProxiedBy: SG2P153CA0013.APCP153.PROD.OUTLOOK.COM (2603:1096::23) To JH0PR06MB6849.apcprd06.prod.outlook.com (2603:1096:990:47::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: JH0PR06MB6849:EE_|PSAPR06MB4166:EE_ X-MS-Office365-Filtering-Correlation-Id: dc9d3d66-8454-438d-89dd-08dbf23eb063 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yR52UFA/yIuu95uBN8G0C/l8pP3xQ4OGy9LGBVsmZUZ3Qgn0S0I2bjCHfY2eM/PftzprH88P4xr+0qxjZ3RxXyAADQbGvMaNC27L+qEKnEbgA99ioAoYEDJ8tZP4eFGGdNOyrJmQNZrqlc5sy/6kGLLuRS1G/6Jst2bTSBbTX5qTrIayzLYSSCp14P8UOByuglmjFiO4q0s3H15PSFPjdW1+FV4LGgSNBN2WWqSZ2hGnv6I9O6+M7HlnF0lDFgRCDCxAmhh9g+mt6u2njaJ38smP8/ExOSBrgC9CagrG27DOgdsTOEK080YBJCJbZh2MmBN0p4mCIMc/fYM5xtFrn1w3zZ5/SlI74YgJ7W51W3oifeBwroG4alAnUeqM/pj9L/V+CpDw2BwcqJc0HIyhomK2H2QACwrn81sRjpAElLZB+NoYmI21v9NW3xKZ3Fik2iV/qI9MQvI7Ke1gbIdaZcVNQS70vcRh+2WR2HPl1UE1xrPTiKI99xM8d3nOeVGd4cMoqw4nCazL381INZxUflHwZ4qEuyP3wbjnRNNoEOqzQSTHMldV5ORLKyGLN6gs4NXzZlECay7bejZ44IMKu7NzGJPcSfzbZHUgiy8SCGEwThMqiDXYaTAzUTX3L/aE X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:JH0PR06MB6849.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(39850400004)(136003)(396003)(346002)(376002)(230922051799003)(1800799012)(64100799003)(186009)(451199024)(86362001)(6512007)(36756003)(38100700002)(5660300002)(107886003)(66556008)(66946007)(66476007)(2616005)(1076003)(2906002)(4326008)(8676002)(38350700005)(8936002)(316002)(83380400001)(41300700001)(26005)(6486002)(478600001)(52116002)(6666004)(6506007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 2Pr8o/qfTPV2RygtU8mrDUrqEih79wLhLS6lH9m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5Gh/zJspgkMLP40bBHALBQdHCgUe21tWsW8OQS4rC1YIOu/jAiRernuhDnXPvztUrh3mH0ZBNTQZBgMhhHxdN0VeR1W4cDhka/hYr+MdE5DP65t4YhcDdlqt8za6ODjEKmR1yC8DMmA5eIpcfsbknB++zfjJvQdj/rLs/B/DwzpL5jla2BuqfpLmVAvl8qb8BXu/PyfBH+XON37+zCr3DVXL0QWfGQEXy4iVoCJLoTptVy4ug87Ha6Yv09kNCYHfnvAG7V5lKD+ES/dq5/cXWtw0WwxYXrVe6xJZJKKAZhkUtIgCBYl68kvw8NpO5AV0wnu0dWPN5+pkZiwZPW4Mb1mhuCcRv8raej3+6vHxyhCuvWwyorxn/VE5n9vFyKuixoO9K4sURucbZEu73KrcMNbRcoY2q6CIqTviJTW91tono6f9YHVKnkVzmHnS7Rj+w+6Xr8JSYuONJ1bW8686+KuCKme+/ApDdlI X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: dc9d3d66-8454-438d-89dd-08dbf23eb063 X-MS-Exchange-CrossTenant-AuthSource: JH0PR06MB6849.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2023 07:25:27.3603 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: lrBPZ/lyVN2Z+LjH/fQdu2EVqfrKRkgef6Ih5rOVL4dSH4XDMaLEHt3nWCjKcDe3ml0xQ/Ul5r0MRJVOxShWYg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PSAPR06MB4166 X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 3D14D20021 X-Stat-Signature: dydaadhfa9fzz3ucw4o8oq1zju8bhswp X-Rspam-User: X-HE-Tag: 1701415533-744876 X-HE-Meta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DbW2or7VH0oYKkP29akXinMvXJO4HLP7UjN+05kELPyEvPcbO5vO8xP5C9Nf+/0WyPiHML5Mh9O+BTqdUM4cs84UM2Z/ZGqDZbAhB4+1QdbKHqkakNRzXik1P588yyvxxElUebd0Fp2YFvNJwY777kmvvfJYu39brRuiKQecHYPQpJEUwUKRhXVy7BnUEYFXmOPfg6gsDa/KhhlJMqP0tHPMZzXOepykd3Q= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: In case that alloc_flags contains ALLOC_HIGHATOMIC and alloc order is order1/2/3/10 in rmqueue(), if pages are allocated from pcplist successfully, a free pageblock will be also moved from the allocated migratetype freelist to MIGRATE_HIGHATOMIC freelist, rather than alloc from MIGRATE_HIGHATOMIC freelist first. So this will result in an increasing number of pages on the buddy highatomic freelist and an increased risk of allocation failure on other migrate freelists in buddy. Currently the sequence of ALLOC_HIGHATOMIC allocation is: pcplist --> rmqueue_bulk() --> rmqueue_buddy() MIGRATE_HIGHATOMIC --> rmqueue_buddy() allocated migratetype. Due to the fact that requesting pages from the pcplist is faster than buddy, the sequence of the ALLOC_HIGHATOMIC allocation is modified: pcplist --> rmqueue_buddy() MIGRATE_HIGHATOMIC --> rmqueue_buddy() allocation migratetype. This patch can solve the failure problem of allocating other migrate type pages due to the excessive MIGRATE_HIGHATOMIC freelist reserved pages. In comparative testing, cat /proc/pagetypeinfo and the HighAtomic freelist size is: Test without this patch: Node 0, zone Normal, type HighAtomic 2369 771 138 15 0 0 0 0 0 0 0 Test with this patch: Node 0, zone Normal, type HighAtomic 206 82 4 2 1 0 0 0 0 0 0 Signed-off-by: Zhiguo Jiang --- mm/page_alloc.c | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) mode change 100644 => 100755 mm/page_alloc.c diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 2f646773a934..95de1204e1e5 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -2861,11 +2861,20 @@ struct page *__rmqueue_pcplist(struct zone *zone, unsigned int order, int batch = nr_pcp_alloc(pcp, zone, order); int alloced; + /* + * If pcplist is empty and alloc_flags + * contains ALLOC_HIGHATOMIC, alloc from + * buddy highatomic freelist first. + */ + if (alloc_flags & ALLOC_HIGHATOMIC) + goto out; + alloced = rmqueue_bulk(zone, order, batch, list, migratetype, alloc_flags); pcp->count += alloced << order; +out: if (unlikely(list_empty(list))) return NULL; } @@ -2929,7 +2938,7 @@ static inline struct page *rmqueue(struct zone *preferred_zone, struct zone *zone, unsigned int order, gfp_t gfp_flags, unsigned int alloc_flags, - int migratetype) + int migratetype, bool *highatomic) { struct page *page; @@ -2949,6 +2958,24 @@ struct page *rmqueue(struct zone *preferred_zone, page = rmqueue_buddy(preferred_zone, zone, order, alloc_flags, migratetype); + /* + * The high-order atomic allocation pageblock reserved: + * + * If the high-order atomic page is allocated from pcplist, + * the highatomic pageblock does not need to be reserved, + * which can avoid migrating an increasing number of pages + * into buddy highatomic freelist and leading to an increased + * risk of allocation failure on other migrate freelists in + * buddy. + * + * If the high-order atomic page is allocated from buddy + * highatomic freelist, regardless of whether the allocation + * is successful or not, the highatomic pageblock can try to + * be reserved. + */ + if (unlikely(alloc_flags & ALLOC_HIGHATOMIC)) + *highatomic = true; + out: /* Separate test+clear to avoid unnecessary atomics */ if ((alloc_flags & ALLOC_KSWAPD) && @@ -3219,6 +3246,7 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags, struct pglist_data *last_pgdat = NULL; bool last_pgdat_dirty_ok = false; bool no_fallback; + bool highatomic = false; retry: /* @@ -3350,7 +3378,7 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags, try_this_zone: page = rmqueue(ac->preferred_zoneref->zone, zone, order, - gfp_mask, alloc_flags, ac->migratetype); + gfp_mask, alloc_flags, ac->migratetype, &highatomic); if (page) { prep_new_page(page, order, gfp_mask, alloc_flags); @@ -3358,7 +3386,7 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags, * If this is a high-order atomic allocation then check * if the pageblock should be reserved for the future */ - if (unlikely(alloc_flags & ALLOC_HIGHATOMIC)) + if (unlikely(highatomic)) reserve_highatomic_pageblock(page, zone); return page;