From patchwork Mon Aug 21 09:04:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: zhiguojiang X-Patchwork-Id: 13359279 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 43BBFEE49A5 for ; Mon, 21 Aug 2023 09:05:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7A0C78D0002; Mon, 21 Aug 2023 05:05:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 72AFF8D0001; Mon, 21 Aug 2023 05:05:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 57BAD8D0002; Mon, 21 Aug 2023 05:05:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 41CB28D0001 for ; Mon, 21 Aug 2023 05:05:07 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 14F2A1C9913 for ; Mon, 21 Aug 2023 09:05:07 +0000 (UTC) X-FDA: 81147527454.19.EDAFA70 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2104.outbound.protection.outlook.com [40.107.215.104]) by imf24.hostedemail.com (Postfix) with ESMTP id B2E23180025 for ; Mon, 21 Aug 2023 09:05:03 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=vivo.com header.s=selector2 header.b=Q2k3kcyR; spf=pass (imf24.hostedemail.com: domain of justinjiang@vivo.com designates 40.107.215.104 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=1692608704; 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=W/t6qNiGCo4BGyRINUotar8Fev75t48czW3tiwz18c4=; b=x5lHqJNofGNyaFUyE92CD7bLW2LpuvYwjBshU7ICxACAGZI7qyiwYkBtHXFBxjQ4DAVKSS gvaqNqVqqhrKgnCD4jUNLJw5YAb2w/HV3XmQaW1GxtPOVb5dAMhk9S2EkHTj7HmJhNo8S4 5fH2zQxyTThuK/uRU8ehNfqZDW3XPRw= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1692608704; a=rsa-sha256; cv=pass; b=1OET5fCTBA4l70e0lrUzmH9jmft0LKhcDqw9xrgamxLjSsJ2p6HxHEww2Wl81m+s7hlYkA aOMa+ZXppNsVfIPskphfsm1+YEjKBm7GkKSrF9Rx9zKDzDCNFr6v7qLg6Akm7x+EQwcv1k cA4NObP3kiS1SfA/QbzwyQ4rTsZ/DvU= ARC-Authentication-Results: i=2; imf24.hostedemail.com; dkim=pass header.d=vivo.com header.s=selector2 header.b=Q2k3kcyR; spf=pass (imf24.hostedemail.com: domain of justinjiang@vivo.com designates 40.107.215.104 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=hDy076UBqa+Pl+WqnSIoLKuR/+S0Ymy4XNS5umDpnpIkyBSlKpF5iAy8Z507WipEw7YtjU3k2XJTHZoVFWOj3Lbco+7kc7fguJrSOCXOV3KjbAZqAB1xIO0fHzXppITpQkGS5tBurt0kCpP6X00XTrJkxpnCvgT6DBPY6kRVCwEij9j7fh35Q+wGxYXfpLDSVh0szV2n7zTbghNzRxumMlKe/ULRGdn6dKEwOJnUR90XtClLt89IQg6mmpOGpKQlXn1ovrbETEOw6+S0S9/y6BKqY0vcbPmsLhWZBqaEgU4KAvUxDc1XeFsEyhpqFU3nezj5IE//bp4F88vf1zh5OQ== 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=W/t6qNiGCo4BGyRINUotar8Fev75t48czW3tiwz18c4=; b=VSjocaxC7mdpduGBm+ju6sKxJ5BrcHEaP05nWBCgKFK+diOciReoWXC9NvBxOpF3JCRCivHObB9G4GTCREabr7rUru3di+mwd/lHELfpkt/tO7y+510NVVD/j+2+fT4+ebiXXhsniOx3RAUTpJznSRFo+IMkXrz/tayGWoY6P1JMm5y2SgYkpbuuD6B/eRblp3UDn4yIa8AWU8hhJNPq0PSu9Fv+tMY2ljyLeUP0NWT/CV0nmX2dCDOyQ6ynTtEYN1O1H/LFBVwFmxidJgbgrbWlUy/hhAAQnHPiS4a8J213MJLacQmSveJVO5rGMfFs/fROfBn8huJGTy/6flEPEQ== 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=W/t6qNiGCo4BGyRINUotar8Fev75t48czW3tiwz18c4=; b=Q2k3kcyRLf0zo6HjOyVTbw82YAsvFLNJw9qw4hmnj+gpIg5rJCxNyy8w8UPUmB2XBaOaRu2ZdqOYVQ9zg7DiSqXWJiuerBq+cIREOtDlNIWgCx4jS9phvMTzOdI5Xec4Ap7oGk7IGQtQU9Gwy01qz5n8hutaK0t9WyrEs4dqTbSd/tSXQmMwrxt4ZeGBmihY/ij6BWa9OcRGdmPKmTw+43oU3VzGuqiu6APh16LsYwNjLu8G+qH4Gpyhe0P8TUTWHQsTHFQV76yJ36kbydF+gPKZKakWDuUUzr4b+BVYhFVX/i/BaH6+E5u93n7xO314zK0zE5jk7v2mc+aKZMoNnA== Received: from JH0PR06MB6849.apcprd06.prod.outlook.com (2603:1096:990:47::12) by JH0PR06MB6557.apcprd06.prod.outlook.com (2603:1096:990:31::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.24; Mon, 21 Aug 2023 09:04:58 +0000 Received: from JH0PR06MB6849.apcprd06.prod.outlook.com ([fe80::832:19a2:2f83:1cfc]) by JH0PR06MB6849.apcprd06.prod.outlook.com ([fe80::832:19a2:2f83:1cfc%4]) with mapi id 15.20.6699.022; Mon, 21 Aug 2023 09:04:58 +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: Mon, 21 Aug 2023 17:04:49 +0800 Message-ID: <20230821090449.939-1-justinjiang@vivo.com> X-Mailer: git-send-email 2.41.0.windows.3 X-ClientProxiedBy: SGAP274CA0016.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::28) To JH0PR06MB6849.apcprd06.prod.outlook.com (2603:1096:990:47::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: JH0PR06MB6849:EE_|JH0PR06MB6557:EE_ X-MS-Office365-Filtering-Correlation-Id: 274492d5-b892-41a6-9acf-08dba225b177 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GUW+m5Gz6jESAgjT1cenl3ymXGI1+BUXtxtytQdxmmgPb16+cTfWbd2nk0z1+gpahm6nvX1MYBnVpjQASAdvKqMU7HyNP+QCId6qv9nBbD83b7HK0Usbsnd/NvSivAQiO5Ci00yO1W2o4xZKaQxCp+bm50dIoqYB8so3gFtG751zU4GUrFfFNG+6RImIAupcvQk09JucFkg2oiRCjaF1EojOy61U6RecT24BRHdNOVxMJZLJiYsU9tI28dp4gpXKfrPGV+3udOf106+2dSDyppXIiOCOwYb0TeQ0+V0x9dd99sQjAXKQyLwWpGfOigVy9hVDj9KicYayys3i5n/j6uMXVXV+kYucQChMdRAWsqqrkRwglgYc8JsZY2QlIjS5FX/B/CCu23u2KOkgAVNXxYwI87RNyeK7ovQnmDnjdHz+GD6pFYWS3yq6Xss+9VHes0boh++TDI7vW3HYyAPhz3btx1GcU2NIYUH7A2zcEYdAWXYzR//u34YmIFM3oga93V891y0bzB/TFIqcCntrn/4GtKn8DtDz3dduz1Wb97jdDVDxFWjYjyv4menLA1uROz5pqFicGC/Epesv8k9caTRwKrevkKYko/J06UYNb18LBRVhtf2jPH7WHjrh2SHS 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)(376002)(396003)(136003)(39860400002)(451199024)(186009)(1800799009)(2906002)(83380400001)(52116002)(38350700002)(38100700002)(6506007)(6486002)(5660300002)(26005)(86362001)(8676002)(2616005)(8936002)(107886003)(4326008)(316002)(66946007)(6512007)(66556008)(66476007)(478600001)(6666004)(41300700001)(36756003)(1076003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 8sSHt04dJ/9tJkPaVPzRu+eQ+cW6bJJVLJnaGIzxb1Qy1VfbeN7/oRN7Nt7mohHLsulwTFtl0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zwfDKj8gfEhfQ6Dloe29xSYdnadCX4A6+VN7B3XGycbXvyopTf6itG/f1/S+Ej2DDu7ejCY3mp2IDGbuPXfetZpLYOm5HTHuHk2lEJ/8CAuS+CwKwL8pONScq78BhEj+A3hbNLyIQW1t8FMFmOTmvEDL8722fPFolc+G7167lzdiqwNQmfQKOakJCdy4iT+OqFQMehyUFy6lH1Mp+tjyMldIjYUaGcYDX/BVShal3ApxT4P2Wbe5aafY/hu7fB58uA4dJpWXeBr12jbNFzALB3WomKBOacMDOXR8D3iFEg/hwykBiqTTOpHRHk/Ud155TwPWViARJKVwRjEARyFvSAo23Uf77G2804cxt0qT+g8Oes86BStIY7RqubrohBHUs5ywK5q0mTGL6BNLCebVH3A4PaXgR+SwMpIdU+f65xRThxnoZrEvd57XZZUpdd+5ZnD X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 274492d5-b892-41a6-9acf-08dba225b177 X-MS-Exchange-CrossTenant-AuthSource: JH0PR06MB6849.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Aug 2023 09:04:58.0284 (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: kF74CfYImBMh/RlsD5R3j5KQSfy+lFh4hHsMLmA4dLelNT2Nvkwjz0Dr6zx6kkMGnXYCF14nNLQdd59QaTLBWQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: JH0PR06MB6557 X-Rspamd-Queue-Id: B2E23180025 X-Rspam-User: X-Stat-Signature: aay41t9qrshb6kx4zrz4us37hc1fdh14 X-Rspamd-Server: rspam03 X-HE-Tag: 1692608703-707888 X-HE-Meta: U2FsdGVkX186/owxm8l97VOgYqhjlhOSXM0nwDpLT4wH4NScG0sdHFg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VSLdaIWkhKvWiqWl9B1i5WuTe8s3lS9DiF8nzdBl/dINZalMhwPwx0kwG4YNKGkz3kCptT5fy0sse0BF5U4b+ErFiz5mH0wabRVV6VJoeH4vMvNK7OgmE2tqGvs7HvEme8wRciN1Wn5pcxWjRylB12l83XNgiA= 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: In case of alloc_flags contain ALLOC_HIGHATOMIC and alloc order is order1/2/3/10 in rmqueue(), if pages are alloced successfully from pcplist cache, and move a free pageblock from the alloced migratetype freelist to MIGRATE_HIGHATOMIC freelist, rather than alloc from MIGRATE_HIGHATOMIC freelist firstly, so this will result in an increasing number of pages on the MIGRATE_HIGHATOMIC freelist, pages in other migratetype freelist are reduced and more likely to allocation failure. Currently the sequence of ALLOC_HIGHATOMIC allocation is: pcplist cache --> buddy (batch >> order) allocation migratetype freelist --> buddy MIGRATE_HIGHATOMIC freelist --> buddy allocation migratetype freelist. Due to the fact that requesting pages from the pcplist cache is faster than buddy, the sequence of modifying the ALLOC_HIGHATOMIC allocation is: pcplist --> buddy MIGRATE_HIGHATOMIC freelist --> buddy allocation migrate freelist. This patch can solve the allocation failure of the Non-ALLOC_HIGHATOMIC alloc_flag due to excessive pages reservations in MIGRATE_HIGHATOMIC freelists. Signed-off-by: Zhiguo Jiang --- mm/internal.h | 1 + mm/page_alloc.c | 22 ++++++++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) mode change 100644 => 100755 mm/internal.h mode change 100644 => 100755 mm/page_alloc.c diff --git a/mm/internal.h b/mm/internal.h index 7499b5ea1cf6..a3b3fdda8031 --- a/mm/internal.h +++ b/mm/internal.h @@ -844,6 +844,7 @@ unsigned int reclaim_clean_pages_from_list(struct zone *zone, #endif #define ALLOC_HIGHATOMIC 0x200 /* Allows access to MIGRATE_HIGHATOMIC */ #define ALLOC_KSWAPD 0x800 /* allow waking of kswapd, __GFP_KSWAPD_RECLAIM set */ +#define ALLOC_PCPLIST 0x1000 /* page alloced from pcplist */ /* Flags that allow allocations below the min watermark. */ #define ALLOC_RESERVES (ALLOC_NON_BLOCK|ALLOC_MIN_RESERVE|ALLOC_HIGHATOMIC|ALLOC_OOM) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 442c1b3480aa..afcd0f875c92 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -2722,6 +2722,8 @@ struct page *__rmqueue_pcplist(struct zone *zone, unsigned int order, int batch = READ_ONCE(pcp->batch); int alloced; + if (alloc_flags & ALLOC_HIGHATOMIC) + goto out; /* * Scale batch relative to order if batch implies * free pages can be stored on the PCP. Batch can @@ -2736,6 +2738,7 @@ struct page *__rmqueue_pcplist(struct zone *zone, unsigned int order, migratetype, alloc_flags); pcp->count += alloced << order; +out: if (unlikely(list_empty(list))) return NULL; } @@ -2798,7 +2801,7 @@ __no_sanitize_memory static inline struct page *rmqueue(struct zone *preferred_zone, struct zone *zone, unsigned int order, - gfp_t gfp_flags, unsigned int alloc_flags, + gfp_t gfp_flags, unsigned int *alloc_flags, int migratetype) { struct page *page; @@ -2814,21 +2817,23 @@ struct page *rmqueue(struct zone *preferred_zone, * MIGRATE_MOVABLE pcplist could have the pages on CMA area and * we need to skip it when CMA area isn't allowed. */ - if (!IS_ENABLED(CONFIG_CMA) || alloc_flags & ALLOC_CMA || + if (!IS_ENABLED(CONFIG_CMA) || *alloc_flags & ALLOC_CMA || migratetype != MIGRATE_MOVABLE) { page = rmqueue_pcplist(preferred_zone, zone, order, - migratetype, alloc_flags); - if (likely(page)) + migratetype, *alloc_flags); + if (likely(page)) { + *alloc_flags |= ALLOC_PCPLIST; goto out; + } } } - page = rmqueue_buddy(preferred_zone, zone, order, alloc_flags, + page = rmqueue_buddy(preferred_zone, zone, order, *alloc_flags, migratetype); out: /* Separate test+clear to avoid unnecessary atomics */ - if ((alloc_flags & ALLOC_KSWAPD) && + if ((*alloc_flags & ALLOC_KSWAPD) && unlikely(test_bit(ZONE_BOOSTED_WATERMARK, &zone->flags))) { clear_bit(ZONE_BOOSTED_WATERMARK, &zone->flags); wakeup_kswapd(zone, 0, 0, zone_idx(zone)); @@ -3208,7 +3213,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); if (page) { prep_new_page(page, order, gfp_mask, alloc_flags); @@ -3216,7 +3221,8 @@ 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(alloc_flags & ALLOC_HIGHATOMIC) + && unlikely(!(alloc_flags & ALLOC_PCPLIST))) reserve_highatomic_pageblock(page, zone); return page;