From patchwork Wed Nov 8 06:54:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: zhiguojiang X-Patchwork-Id: 13449614 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 20960C4167D for ; Wed, 8 Nov 2023 06:54:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A31448D0099; Wed, 8 Nov 2023 01:54:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9E1478D0058; Wed, 8 Nov 2023 01:54:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 85AC58D0099; Wed, 8 Nov 2023 01:54:26 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 7402E8D0058 for ; Wed, 8 Nov 2023 01:54:26 -0500 (EST) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 4FE20120B92 for ; Wed, 8 Nov 2023 06:54:26 +0000 (UTC) X-FDA: 81433873332.11.3457E03 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2124.outbound.protection.outlook.com [40.107.255.124]) by imf12.hostedemail.com (Postfix) with ESMTP id B3BB740003 for ; Wed, 8 Nov 2023 06:54:22 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=vivo.com header.s=selector2 header.b=NXQO2lpO; dmarc=pass (policy=quarantine) header.from=vivo.com; spf=pass (imf12.hostedemail.com: domain of justinjiang@vivo.com designates 40.107.255.124 as permitted sender) smtp.mailfrom=justinjiang@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=1699426463; 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=gTKL6hv9rnjKa07vZUoUXnRqrAT19zfXagwRqdx46IY=; b=JDyoY34LgQqmqWOTxuT8hKYFmQbXCzm4IYwOt8ztyKibp6fT3Ejz3X6cFmFOqAcYGxTJLu KeiJ0A1oDoI2A2j1w1n9FrZVLLTb1OgAiLAslCzVfgkxpyE9K73JmL3zcRodD8dOUBACQ/ l54/3xWmymdx/xr3lzegx6DHx7txzJE= ARC-Authentication-Results: i=2; imf12.hostedemail.com; dkim=pass header.d=vivo.com header.s=selector2 header.b=NXQO2lpO; dmarc=pass (policy=quarantine) header.from=vivo.com; spf=pass (imf12.hostedemail.com: domain of justinjiang@vivo.com designates 40.107.255.124 as permitted sender) smtp.mailfrom=justinjiang@vivo.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699426463; a=rsa-sha256; cv=pass; b=cpFHnyw0SgN/O/mRVkRMrKoMxK0knClDBxzhOsMw06a2Bd6PrSbgu41OfXsXrOqS0imLGq Nyc/zNR8/u3XV11Q5jGxR1Miwyb9Mm4UODXJY665o2bh75uM0JW4grb3gYWE/OrMczWg9s DV76h65J75TfMFguMndpvxgDfG+7JPQ= ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aNTTU2Sz3ISOUk2WEJ+V9APMeBuNaCvIX7Y5M5uu0UnS5VcoD3d3trM9gzL0vF4BH90hsLq3n3upOxMbCKm/tMoH/qBw6REJ/nqrKluCbOGvzcpsbWVKNXHOuWHWH8uvu2QkYl9sOseLCub/iS2/dioYnYoDh0DsGcqaQn0IxItfhE/NOCVBjQh/J/kdN35475vQmhTwX/Q/5wfdgaKKYDsyqxbosyQ/RGaJHotRz6DwxAfbGES812F8X/HAz8vAg1no30L/z4npaqXGEcdiTnhj0n5juZ2y1rH5zVeZFtor1wsk0OsPuaCxv1Uaf2PCfG/yrIvu02pMEreOSgYp4g== 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=gTKL6hv9rnjKa07vZUoUXnRqrAT19zfXagwRqdx46IY=; b=TuwFVgUWdYHYG4pFoQdUboB5RxOIQhGuhTjLYnu/jr/LjQpYt2C19Py5ygx1N+03xfr95lIANYCNrojzYRMfs+tEsfMcllABsoHmnz9Z7MpfZD7LTueGxPkiyIEo+ujoqASfbJmg1p9ETL6mUpAQKi8XFltghwBX8xoHBBzRB/YiaeIx+uQPyK7mizsE7tN41y0HmVaOgUH8KGxmrGQ+xVsqUUozB18QfQHmT7yjPkAABHePAJgev9a8J+Awrho2Et2xg4o7FdYuU0D9Syeo/UHZnMIZhX+6D1EYRLQOaMmoCQ11hBpVQ9dqqku9OoUKvcCnP6pTmHKAqvkDqkZKOA== 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=gTKL6hv9rnjKa07vZUoUXnRqrAT19zfXagwRqdx46IY=; b=NXQO2lpOgDWDz+ZYI9wqkSuWsfCMyjoE+X59irMumpZ0m0E5JjmBFom32SGzUabwKi/czi7zXEMckHuLfrmWUvfjdp5uO5xbP3Y2AvetHGwUdL9YrK+lCJmuEOluQ5mZHjry3JDuvJy3L3XP3INKV4w8gwlLRNNbK+61XU6Cj8FZQwZR60Pzks39fg5dNvMxkEwQYmq1W3JdcVUxo0g+RnpGiQDI2fA8gKWN8waAhD1hqbBBQB7Vsd6ZN03uLPOUTC5sHxlcXS8Zxa/lcfeV33PXu/rWn17AByUXR4oqM3Apkb+0E0gQMuOG5FehcwaDHjsoLfJttRruJDWEWArwkw== Received: from JH0PR06MB6849.apcprd06.prod.outlook.com (2603:1096:990:47::12) by TYSPR06MB6314.apcprd06.prod.outlook.com (2603:1096:400:417::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Wed, 8 Nov 2023 06:54:17 +0000 Received: from JH0PR06MB6849.apcprd06.prod.outlook.com ([fe80::bdde:31ee:f13c:79fb]) by JH0PR06MB6849.apcprd06.prod.outlook.com ([fe80::bdde:31ee:f13c:79fb%4]) with mapi id 15.20.6954.027; Wed, 8 Nov 2023 06:54:16 +0000 From: Zhiguo Jiang To: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Johannes Weiner , opensource.kernel@vivo.com, Zhiguo Jiang Subject: [PATCH] mm:ALLOC_HIGHATOMIC flag allocation issuse Date: Wed, 8 Nov 2023 14:54:07 +0800 Message-ID: <20231108065408.1861-1-justinjiang@vivo.com> X-Mailer: git-send-email 2.41.0.windows.3 X-ClientProxiedBy: SI1PR02CA0059.apcprd02.prod.outlook.com (2603:1096:4:1f5::19) To JH0PR06MB6849.apcprd06.prod.outlook.com (2603:1096:990:47::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: JH0PR06MB6849:EE_|TYSPR06MB6314:EE_ X-MS-Office365-Filtering-Correlation-Id: 4652b093-a020-4652-483a-08dbe0278668 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Z4FKmdvHRal29dYb5glis9m+7JAObOxJq2/Ex4GdOkMbLl5uRD8ENg/a3eZdsCZ+Vdi1jvBVOlAwYCdMM+DnnxLeji8dgXTnuZ/E4FkNIUGj8cx4+SmFwXprmoT1aS7ogMc8/eLkuvHf8C/mDXwIc45i8MEvjAKeE67lG6QGIrTn9TiXqTTZzpeOwtvLSJ6tQOjsQMn2mXDo386zsaDg4JC0wv4Ck+Pf81P2Dxf0KUzbGycahDmJUWiCnaJxAdC9kJSc3+LnsM9rdbjD6uxOmglioR6LSk2NpVQUhPYJeF0A79eUiHAcQyk2ap8jEzByeoHFlgiRESEcRD16pGXnGeCg4g6dDYwMx4iiSGXJGiyNsl7gUbxy0YwkgjFjIHqRKDpyTSaYMcdn3NDIh05wZWOF82cydx+ke4OAMnSFh1U2IUorYxjh7vpgifCF3alo30GpIRkfgINCQkke7Z3u2prq69LWR+RC4/PeJQhL1JXqKExR2a1u7STF9Ni7foNhdomO42twY/XfD6AYAsGWzsM8Muk+JXg22wfTG65RTO/YpebH/A3y4+Ygpf6Ess6LUyOd20of1JUFamFDCxLkD65f/O+HWh0THpW7Oi6yR1371MDYPAkV9T9+naDmvtF8 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)(39860400002)(396003)(366004)(136003)(376002)(346002)(230922051799003)(186009)(64100799003)(1800799009)(451199024)(41300700001)(83380400001)(38100700002)(316002)(5660300002)(478600001)(107886003)(52116002)(6486002)(6666004)(6506007)(2616005)(66476007)(66556008)(66946007)(26005)(6512007)(54906003)(1076003)(2906002)(36756003)(86362001)(8676002)(8936002)(38350700005)(4326008);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Tc/7EH7STe7hiXNVhjLt8LLhNT5lJCg4vW9Tt7tE6Oco5tWL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W3IS32nB1n/X4ycBD0GEU3S21cCEA4AcgY0KJ248x7U8b/iE/2MH6UCVrn7lX2+0nK3z7y4QYMIZIUOAbp3v5ub8ScVN3OE1Sp+8hw/28WuIq2af4WEUbw4THz5HQUTxf4aEzVOT/AlkoMCbpwe+2iJ0KQafyll0+btoYJ0sQ5TMxPJeUGvbW1UnOeR7KZ8GJiTZwyO9v4J4emSOBcMzTEIosOGwUWF1AithISBmKCKlVZMK+1eoGfO9Q50qQihQLAgUohUfzIwNTanY/WyAXp9sgUgojIsxf29pneFKKcN/iRXYLc3omE9gkMWc/BY7bC4iNfvRda7h26qMTUVfXoPYiQW+ZGUZfbqFmBwSvMiGEJ11cqxMClUHcVvp2QVfLnhEydm2MYs80uqUvdVlVotk04WZvTEjXdjqVX6QokXMAs9w7XGPjVC0tvmPjIBUgcyS4ReC3PcHiLx2DHMMc2h9 X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4652b093-a020-4652-483a-08dbe0278668 X-MS-Exchange-CrossTenant-AuthSource: JH0PR06MB6849.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Nov 2023 06:54:16.7935 (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: 2t317KZ+gsRZJ5hXE/wlzbj1McFYoT1lGxMH7y1j/+z9CI6QMxtxSpNQNSyOKvcf4rm/BVCw3MXCpjFtJ9ZN+Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYSPR06MB6314 X-Rspamd-Queue-Id: B3BB740003 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: fp37kn78b7jfwg7xcujha7amqknzj1xn X-HE-Tag: 1699426462-571022 X-HE-Meta: U2FsdGVkX18G09u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mG6UKbHicdIxR3EqwN4vIZ3PtOqLyaaEWcKgmMAYQom8v45Rm42M1VjUZY9pUIZc3txmA6vM0YKwm6nYskYhv/7rLrngNbLHqjeZdGqjPTf2406ZrPCPKAUBAi1t6VXEGhoqsk7lIYyOKXQlnzMg8uuibSDFPKQGDsSEPxTNcOG/XtgMzFiNbObKjWZIv+3oOLFTZoT0Hl5zozSCg= 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 alloced successfully from pcplist, a free pageblock will be also moved 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 --> rmqueue_bulk() --> rmqueue_buddy() MIGRATE_HIGHATOMIC --> rmqueue_buddy() allocation migratetype. Due to the fact that requesting pages from the pcplist is faster than buddy, the sequence of modifying the ALLOC_HIGHATOMIC allocation is: pcplist --> rmqueue_buddy() MIGRATE_HIGHATOMIC --> rmqueue_buddy() allocation migratetype. This patch can solve the failure problem of allocating other types of pages due to excessive MIGRATE_HIGHATOMIC freelist reservations. 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/internal.h | 1 + mm/page_alloc.c | 21 ++++++++++++++------- 2 files changed, 15 insertions(+), 7 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 b61034bd50f5..f523242baf0c --- a/mm/internal.h +++ b/mm/internal.h @@ -905,6 +905,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 /* Allocations 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 b8544f08cc36..67cec88164b1 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -2854,11 +2854,15 @@ struct page *__rmqueue_pcplist(struct zone *zone, unsigned int order, int batch = nr_pcp_alloc(pcp, zone, order); int alloced; + 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 +2925,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; @@ -2934,17 +2938,19 @@ struct page *rmqueue(struct zone *preferred_zone, if (likely(pcp_allowed_order(order))) { 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)); @@ -3343,7 +3349,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); @@ -3351,7 +3357,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;