From patchwork Fri Jan 12 01:20:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: zhiguojiang X-Patchwork-Id: 13517877 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 189C6C47077 for ; Fri, 12 Jan 2024 01:20:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 89A596B0095; Thu, 11 Jan 2024 20:20:55 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 849376B0096; Thu, 11 Jan 2024 20:20:55 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 69C1A6B0098; Thu, 11 Jan 2024 20:20:55 -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 559DD6B0095 for ; Thu, 11 Jan 2024 20:20:55 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 18C9E120D19 for ; Fri, 12 Jan 2024 01:20:55 +0000 (UTC) X-FDA: 81668904870.02.C9902C3 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2098.outbound.protection.outlook.com [40.107.215.98]) by imf02.hostedemail.com (Postfix) with ESMTP id 1FC9B80005 for ; Fri, 12 Jan 2024 01:20:51 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=vivo.com header.s=selector2 header.b="Sy/rvxmF"; spf=pass (imf02.hostedemail.com: domain of justinjiang@vivo.com designates 40.107.215.98 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=1705022452; 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=gKphRTy6V34wwW5enkIWD6afGzVuy6OA3rhDi57grb7dfC+vhu/KeBpzZtkjTG1aqZOpQY HAhNTsVqiaORREnYdxcuwZNk1BIV+kUpa2sx+zn9cz4UzcJjonbSbE2Ox8ScJuD+LATvFK 9ptG780+d+BfqX8osmPo3eUjoWmSFes= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1705022452; a=rsa-sha256; cv=pass; b=nZlEWxbXu9AErcY+c36i18Dqudy+wZmOTcujbJjJ03AtH0w9T+v7mqKGTmsCdoa/jdAn5Z 6J34zyy5TPwe7oPUO2GxYZWFSN2UMEPHKxhqZISuHQI04mjH1VnamvVj+rZ3Glt2a+E7Ol IU2QadTMTRGsMdvpL2fgi4sUKzQErm8= ARC-Authentication-Results: i=2; imf02.hostedemail.com; dkim=pass header.d=vivo.com header.s=selector2 header.b="Sy/rvxmF"; spf=pass (imf02.hostedemail.com: domain of justinjiang@vivo.com designates 40.107.215.98 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=L0raumT7mtLW8mYdk9OjWwOZwjiTldTXybczaka4mhdkEq5Dfhf7eqlLJbVUOaRh8P3GfrG6kPqhRaOrNrtNeyDcBkMidwod6c5kIzlsY4A5swLD8wncix23Ssx1v2HDsH7pTatcBSuI6gOK7HJ+p5dVnSNcR5EMkhXxYnMTwixRBaMMB4qMQO6TXCAMSJ5qR5gmlH7N9XvpdtpxNjKndwHdi//kkwl63oC0J7sh9hiIazuwB3ds5qbrD3H4DqO37pLywRq26WoxWMQtytfzCcbRpVqnq4huUNkYpEdKXyeMyRDoYJp4g96XqbWgaJfcZQ7wCIJjjwSwqaG8zyxVdw== 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=exfFN9ltYwzjYqGZrZknfKd/Gx357UYJydVPC3utQovTvQQvz4xoD0wT/PoGXdQ/kcAB8q8TSLsyIlb5QDT3WTJBn+oQh+Yuef7+QufZdoLN17uZ/ezKXX+XgubC+2uDDcjQfu8NsOK4hsmq//FKwk1AcTLucK8e1zWAhaBgmcg0Jcn3dFIuygl2tEyHZ1nE906snehtmy6d4xzQyTEaUSyjI0QTVMVYO+QM39V/RHZMPF0tY4GqPvdUdmt6tO7pggNwfLSdNXhYo6+inqKchbJpTcQVuF7Xids37GqS7AcIbJ96kBkMeWPqAuP5Q2shAmHB1ukNeEDfzfL4+VL+ow== 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=Sy/rvxmFuVzhLuUxHPJei/EZ7lgVZx3zOqD45pH/lhvkwKgeJ83M1JIe7wHbfiqwc3O0k1AvL38v32aanz7au95lG+KXYhxhMp1k2TuWg/hLy2QSGAVNQf3LbR1XmX02L6EXAnjjgLtoU0Fk1JB7aAu7EfgqEmhiN/qHlzOpz1ASCCFs5bIRXf1Octfgz3Vpb9VZkqghCJgbHpPZp22VCHhkD28BCGD7/EUM6MjRvLjz92QfZNnRneR9CKETW/lCiNyLwqOyKHoRtMogXX/qOEcxGX+29XgZXC6YFJ4hPk9rz+fijmmzdlZe8wpXBinVpCUFdljQgBlo13aWwCxd6w== Received: from JH0PR06MB6849.apcprd06.prod.outlook.com (2603:1096:990:47::12) by SEZPR06MB6598.apcprd06.prod.outlook.com (2603:1096:101:187::13) 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:20:38 +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:20:38 +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: fix high order atomic alloc flags issue Date: Fri, 12 Jan 2024 09:20:29 +0800 Message-ID: <20240112012029.1363-1-justinjiang@vivo.com> X-Mailer: git-send-email 2.41.0.windows.3 X-ClientProxiedBy: SGBP274CA0001.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b0::13) To JH0PR06MB6849.apcprd06.prod.outlook.com (2603:1096:990:47::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: JH0PR06MB6849:EE_|SEZPR06MB6598:EE_ X-MS-Office365-Filtering-Correlation-Id: 19dad426-14b1-43f2-1da7-08dc130caf90 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Znq2oxDMrMVUnOT1vFbKYqYDEKfJKRBMHBMPz1kF0sAozjIacrSBJFrP7K0E2f2tWMA4BNRr8YI4j6lagLHemCDJuUOvhmI+ML02nfUm3IaKmrXYPI7DrSrHVoIx47+qurb3xStlsPCeWKW1bHqR8JtRqzjUSgFHexICpOaFMZXr6NAD5PtMVtBxSu2Ly/PiSEAaybR1j33cJlmfCyEzox68mpr8BEw9uswwDVIhQXRGtXXfyyRkYb09KHY0w08Ef3vRI+qOmNoUEvgO6Br+H+oDjKNQlGPeOk6idSsJ1LC1f20SU32375FtptrP3pGOIOyZEPsCt91hvFLNmFJSrn0cKL2WehTlPGMT3ju3U46oMj5WsqMiaNbuk6rIWYfyo13RaYxhcL6MLiGSSg7IbjGdmS75xspOII1bHz9IJtuIrahnMQXpNRXZPSEHXHb0mJ38oQtl7AdpsocdJa9z3Pi0j3AoHKRQL8jaXRsz7SLNiFA693ZZwXgA9YxDgS1MVpoG6v2qUzCeGWU3s8y5Pk/XR3IMhDxno+iVuIv3QaXUAZrb8rxMHrZfdrhWHucC6GE0qldQSS9WF2XORTs6w795hLg20w/7kSesp+CsJken6f5N/505kwcufF4+WniE 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)(136003)(39860400002)(376002)(396003)(346002)(366004)(230922051799003)(1800799012)(64100799003)(186009)(451199024)(6666004)(6512007)(6506007)(107886003)(38350700005)(52116002)(1076003)(2616005)(26005)(38100700002)(86362001)(36756003)(2906002)(8676002)(41300700001)(4326008)(8936002)(5660300002)(83380400001)(66556008)(478600001)(66476007)(316002)(6486002)(66946007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: y2BexOMxQ5f9kTxt+7kiiDY0ydz6zg801nNMkUgkVjoehl8fSJ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UnAqzOzMRSHwdxfdb0ODkckhU6569e7l2LBWD4IeIyQ+cjRIZOv7tDcftFz8dfIFp/vajjG8BQZmyW6znQEWFjEMzmQ7mlNnyh6UkXtSdZdG/TbNpkezDvEdJa/zpsM8wG9YOrCI+jG6H3xpmlkVirlBhmtRXNqg+o5IrVELI+WnAINFsE0YhgnD9PKCvHCYTKdnuRd3rPeREEfUQUiQXufq9PlHj3DTL10+qbyHwqnI1vHFEYA4zkD5OFcYhSiX6G9CdkiabNoJgZlP18zr22/C9x6Xzccf2gAc9tvlD+yInmyMPGZBVQ2hZyjfu8lUJPLbYpQt2F1EshMXF65SPHEoZCheaCa0aufjgqb73gBUvFNwghgpXec3uaYcGcU9gwKinu/YBHg6p8xRW3g2aN4PwdRgCZS0UTysRserH7+ckYUBBF5G1BtJToYkbqt+ik2uCaPnVsz30dSbwtI1yjJR0mXn1Oxfb+MKxkvupA8eK X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 19dad426-14b1-43f2-1da7-08dc130caf90 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:20:38.7034 (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: 0jaYux3nV2k23IMa8SL3BQKYHP+fQSm/hq7y/qZWIEHt7C/H6saLGZg6iVZaQyInNWmS9RfZQaKf5TER44MNjg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB6598 X-Rspamd-Queue-Id: 1FC9B80005 X-Rspam-User: X-Stat-Signature: e73h8ydgric8by4zmqu7jfi69zhw9byw X-Rspamd-Server: rspam03 X-HE-Tag: 1705022451-479041 X-HE-Meta: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fTwzopl35x5GfA6CQ+7it+B92U6DZxuXH9uKqKw/ERg6wTPHeEOpzEdY5pODQlYuA7//2hABohXol1HBGIscV1tosbKB9DubAXHIc8t9L2gBzsftW81VYgdWcFYUgIRbrgdf0prdFjkYXh2Tcln6lmVmlcZ/ExDr3/0ESDRwtQJdB17wYnwEnG2j/W2x/l1beSP9vyR6OOTia4Mzm4ZGnmzlDGLsR6lOytxDEPaUNmrzzNvwiKk2vdcmHFjtkTGG2Sr0FPYWwLud6g== 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;