From patchwork Fri Jan 12 01:14:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: zhiguojiang X-Patchwork-Id: 13517876 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 C2792C4707B for ; Fri, 12 Jan 2024 01:15:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 315816B006E; Thu, 11 Jan 2024 20:15:29 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2C6F16B008C; Thu, 11 Jan 2024 20:15:29 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 166776B0093; Thu, 11 Jan 2024 20:15:29 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 06AF56B006E for ; Thu, 11 Jan 2024 20:15:29 -0500 (EST) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id CE3291C1773 for ; Fri, 12 Jan 2024 01:15:28 +0000 (UTC) X-FDA: 81668891136.10.CB2D21D Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2133.outbound.protection.outlook.com [40.107.215.133]) by imf20.hostedemail.com (Postfix) with ESMTP id DFEC31C0009 for ; Fri, 12 Jan 2024 01:15:22 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=vivo.com header.s=selector2 header.b=fxI74Co5; spf=pass (imf20.hostedemail.com: domain of justinjiang@vivo.com designates 40.107.215.133 as permitted sender) smtp.mailfrom=justinjiang@vivo.com; dmarc=pass (policy=quarantine) header.from=vivo.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1705022123; 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=XEMxFkW5JMYxxCjmvZ1uNxzi4tkhLTUgKt9RWXzRUQA=; b=PF7FxqjNHMIHlZ7Y5GNTme3cESwa9BEdDh2TBkyFtkuyOtcFKocXy2H/774nrsH7RHUw8R BTr2kJNtGqcrtCIn4PH6Jnuuv3HrwUj+t0n9I2R0VX0bmgc2JyKw90UeAQSl9K7uM9Qy9C Pm1lmAC1FvgzUcVH5uwo8y3if6K4s2E= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1705022123; a=rsa-sha256; cv=pass; b=7k8iKGg9QuGZIFHQvT2skJED9Al6FxdJLWWQ882Iahc1uKpNQ8PyBhXo4Lx2P9lQFMbAcz knQga27T+NR157uvSjppIht0at8A3nXfNEtWiLZrKdSA7LNjKrf7JpyhhYfVSaPIQk3tTY Tta9vWkgpe0+5Ei4AztBCSDx19Lud0Q= ARC-Authentication-Results: i=2; imf20.hostedemail.com; dkim=pass header.d=vivo.com header.s=selector2 header.b=fxI74Co5; spf=pass (imf20.hostedemail.com: domain of justinjiang@vivo.com designates 40.107.215.133 as permitted sender) smtp.mailfrom=justinjiang@vivo.com; dmarc=pass (policy=quarantine) header.from=vivo.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g6QN6GY1EJyBPZ3Km+xegYZYV5SZ4ZZejnVFg6CY7WG0z+XtRUhOLX0mS0U9tnJjiqCwSnpKQzqNxF4+7J7jf03BDDzHvVUMA8zbLxeXYa8Qo7R0sbjMRfUWEjy2wUViijOefp9pONvbQLM5SHzSSuzcy+6ovWQAHshFtSkM/5m3Lw29/L5VVb95QPal5GZZD5sVH1DSZg90+2MOWkbmpXDJNBWFczLCG2KcweIh1ahxUT9wwJsz2V8KzhD+PF4GGIcG2OFRREiMTqxOcwHY8GWqwSV1icraQi5dVFEcQSwc2eVzWySgKGCN8yoNAZXWkbjC+xGOke/vgQxORRfXJg== 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=XEMxFkW5JMYxxCjmvZ1uNxzi4tkhLTUgKt9RWXzRUQA=; b=B6ZBQPRKfAtia5WJQZUVi70rJWLZ/AKLWEDnnpiPP5gI87PSJiDM9Ilq1aZIIpke6mX4V66BqcltR6j/x+bNB+6Y5HpSSbvUYPBB17t9ga4I+cyW48Qx/PIYQ5A152Y5ddl7gN6m7c8QnXqCRR2aH56AZuA6J0AmA9U5tm8BsnPy68tuaS7FrFS4v+P3ey22D4pZoz99encaOOr7ZdfMS2ZQXkXEX3WoCHZ3IgHaE83X7sk3hp+GEYiWo6sNI8KPzD73vH2T167A7xmZsuxodquLuq1CEST46LGuN7ARii3q6KT5rI5k3c6O9p3iw5iotnuARkG8D/U+ZlqAk9k6QA== 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=XEMxFkW5JMYxxCjmvZ1uNxzi4tkhLTUgKt9RWXzRUQA=; b=fxI74Co51H1IUncN2UZuHfiO0I+OkAaEZqAFTR8MUDaCwP9c57bV1j/wpg1oxK+WnYJp5ovu0PluZHcvJJEUnIeNqPrW+u+uF2jO+BrkY7HUiFLLWcCrN09BAKkjMpaUvnakFBJo2zZhcvlTtcw2/3d0PQTRloJXMKlEWndm9vOrMOazhKFkDvofunZ6yPaQnTfG573JM5yuQEfa2CxAVTJ0s+tSipyM8u3KsoV/JRXU9h2iOzDcWOKEo0UGDW/pPU91zvAEiQBYHsraOPcC3az+8vP7j6lsisgQVmYcoiATux4JSL8Bs91GDdyjX18ces+8mkUQZUi3EpJHLnWMsA== Received: from JH0PR06MB6849.apcprd06.prod.outlook.com (2603:1096:990:47::12) by TYSPR06MB6338.apcprd06.prod.outlook.com (2603:1096:400:433::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.21; Fri, 12 Jan 2024 01:15:15 +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.7181.020; Fri, 12 Jan 2024 01:15:14 +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] fix high order atomic alloc flags issue Date: Fri, 12 Jan 2024 09:14:45 +0800 Message-ID: <20240112011445.1351-1-justinjiang@vivo.com> X-Mailer: git-send-email 2.41.0.windows.3 X-ClientProxiedBy: SI2PR02CA0002.apcprd02.prod.outlook.com (2603:1096:4:194::22) To JH0PR06MB6849.apcprd06.prod.outlook.com (2603:1096:990:47::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: JH0PR06MB6849:EE_|TYSPR06MB6338:EE_ X-MS-Office365-Filtering-Correlation-Id: f80586cc-4eaa-4a85-fcbf-08dc130bee8a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: y6TOnbBykqJAj3o2m4PjQL/Z0GDC59y0E4Y+QqixtFOjzFZkJJEO/FjZA4axoN/lTBUP5UHhnAoyX0ppSO4o6ENzwjJOpViRRkYOiNJwqrE6oiXMgjaMV4rUIhDpsdLAAzW+SMDsIQojq939Ij865sSA2Y4UJFypoPq8TbErleVTWDmzVzO1B05PNuRCS353IMPyuvyeN0XxyASJtALQcG4diM5jFz6C9hDNYaJttWZ3fKfHUFknAld3zKwxH/LC+KgnJ/dMxcr0h24Xg9cR+uLwsot7FhC8Hev1Eu6F+cXu9yYctyDKvJykmyAx4WdpD3SvnY1BZ376duHsmYWLsP/1DofmP5fm4u6+De0abLUgI9JpQ6u+xxdCXisxxAw8Lj7hMAooU3N+eCYaKLJHm62Od/WogIsCVMr7BLdsIh7ncu0PmIxkotMBHOzIpNDjQsx7kqBTKl2Kh6+u84c+rHF0s3oD1NPKbvhfZX3b8+GtmkVwSVURoMEsjgN2YrjqC++XJJoQPJjODXo1YwOuahyt2RCnyLi00SsVrxGfcHgA5VYnfx9WkUexz0R4oT4Or6QIsE+7Fg/SmlXCNEZ0IuFZAmaYym3K8z7uCVu+CD76EaTzYPZSkbGW3vwhW1dt 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)(346002)(39860400002)(396003)(376002)(136003)(230922051799003)(1800799012)(186009)(451199024)(64100799003)(38100700002)(5660300002)(83380400001)(8936002)(8676002)(4326008)(2906002)(86362001)(2616005)(107886003)(1076003)(26005)(6666004)(6506007)(6512007)(52116002)(478600001)(36756003)(66946007)(316002)(66556008)(66476007)(6486002)(41300700001)(38350700005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: wb3tm/L8OPwURQzve4F36BnZPvOZ4Tz34/0+yDf0lNZs8AKv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WQIR/joraOh7Ybn3sfJ5IlO9YndXdVTtgDWv3qH6ZM5OM/vR7NsOEPQnAZRKJ59rl2f1/jjnRIzTv4iPS3n07HJG8h9+/ulv5RzVBwPHhk9gYnVrjuyPUC+8DV8gkVjJbougoQlRYwqpw0llC0KhGmoGRz8e60PUIV3SkbPVU2Bfk3KTfFXCKZqdyNG/TqlfFxcNTbxGAc7G7jezOWsRdRPurKwBHB4kFO67g7D76zJG8Ig6wt4rMkOuQ5G6IYtV6K/Xf6uUI0AUegtXKvbFIVlb9f2XQTtKMpzUr95oiDpIBXK7CxY5iLXsNJ8FQgG/y1bK1GjsNYbi+o9HWfm9AZb5KVgeWeBsZ98PKRTpGB1l37K6wuPmz6BMD4NDiX/2YjbhJassIrBidCLoxn+f+0X/kAhgcxtszGXJf0VNOvPrvWaeQ5ramU+PkSk095OLKbhJwJylWwslvY4QDdThUh X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f80586cc-4eaa-4a85-fcbf-08dc130bee8a X-MS-Exchange-CrossTenant-AuthSource: JH0PR06MB6849.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2024 01:15:14.8755 (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: t9D8zVe4I47CnRcF5DGoCeA3WOEHtRb8WoGrpD47dQrWpl5Bdep1/zPZuNxOvoj3YoXiG3OcqmyyR5YIiyEygQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYSPR06MB6338 X-Rspamd-Queue-Id: DFEC31C0009 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: qgrf6ftama5pmdwr74efhxfps1rne9p8 X-HE-Tag: 1705022122-492219 X-HE-Meta: U2FsdG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cw8TOYCuoyIs3owL4p2UCczCAYlyK9TZQWZcNVXiqqtFxcetC1ROQCmeVATnFgrJR3UGkVaLlFevZp6c1IUtfDw1nF4+QRYHrhURE5VgjDDEySWx4Dl1XSO276LviNX6Ni4J+1okiso0/ZzNmrvVjNeAsb5bEhjxuJD38i64bhbiljyV1cBqSI6wIYBc5S5FcHb1X897H0f0OiEtoA1jkOIWTCpPkcjup2PPsa9+3NCoLtg== 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 5be4cd8f6b5a..ba4a3adde9d9 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -2853,11 +2853,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; } @@ -2921,7 +2930,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; @@ -2941,6 +2950,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) && @@ -3211,6 +3238,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: /* @@ -3342,7 +3370,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); @@ -3350,7 +3378,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;