From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E67141A55B for ; Wed, 15 Jul 2026 19:08:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784142526; cv=none; b=IzDeiz9a7s9Vaqubx3hvwL1cJBdn+i/wGyXbfueGS5duWRDeI2R/CdreR0YjljnVf3hBteaxoQ6lAgmgbfovC9c+mhY73RZfGBWB19YJk7Pi+UeyerBGAixxhfkVjsknogzVziK7OnhOWZAi8shMGXR5qofz/qFYlkY7ufl3Plk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784142526; c=relaxed/simple; bh=nYMllHEFvEB+gih4BxMD8sDJ4+DQG/6x3T1gLl4iVso=; h=Date:To:From:Subject:Message-Id; b=RwV4mxjAWDZtqd+CysjbvW1ogPYRn+xr+hftwbfKWYJ4dQ8MJWaYaJb3cGlqHDfRQ9jwQV27K4+9KF8qxa8/wz0nqa5YjlRMANYJ7JQdDsZ8jEPcKJz6G4qT+ryiAB3DxePhNYhQil/0frFS2mUMKEl7Nx8t3LvlG91RwAOHUmg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=ekmJsyfD; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="ekmJsyfD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE7E81F00A3E; Wed, 15 Jul 2026 19:08:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=korg; t=1784142512; bh=K50VByJwRpZdbGqNE7zgZpv5CsQqAPFrHLuvXr1GmO0=; h=Date:To:From:Subject; b=ekmJsyfDj7mpvGIPlnshz/1fCEByDVwDauHJQzQrrExenWQLX8xQORgF+2C0yiUNh L6DipaujtALYi7/En6bUvdSNSiTBmP+s6BHvGcKcSI+DGKFrZDvBqFDD5qzrSaX6Sq wDg9Ye11vOQAYMn87HaLRDIByxfwXR2gyrrDwYcA= Date: Wed, 15 Jul 2026 12:08:32 -0700 To: mm-commits@vger.kernel.org,ziy@nvidia.com,vbabka@kernel.org,tj@kernel.org,surenb@google.com,rppt@kernel.org,rostedt@goodmis.org,mkoutny@suse.com,mhocko@suse.com,longman@redhat.com,ljs@kernel.org,liam@infradead.org,hannes@cmpxchg.org,david@kernel.org,bigeasy@linutronix.de,jackmanb@google.com,akpm@linux-foundation.org From: Andrew Morton Subject: + mm-page_alloc-rename-fpi_trylock-fpi_nolock.patch added to mm-new branch Message-Id: <20260715190832.AE7E81F00A3E@smtp.kernel.org> Precedence: bulk X-Mailing-List: mm-commits@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: The patch titled Subject: mm/page_alloc: rename FPI_TRYLOCK -> FPI_NOLOCK has been added to the -mm mm-new branch. Its filename is mm-page_alloc-rename-fpi_trylock-fpi_nolock.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-page_alloc-rename-fpi_trylock-fpi_nolock.patch This patch will later appear in the mm-new branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new. The mm-new branch of mm.git is not included in linux-next If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there most days ------------------------------------------------------ From: Brendan Jackman Subject: mm/page_alloc: rename FPI_TRYLOCK -> FPI_NOLOCK Date: Wed, 15 Jul 2026 11:03:18 +0000 Patch series "mm/page_alloc: couple of followups for recent cleanups", v3. This patch (of 4): As discussed in the linked patch, the there is some inconsistency between "trylock" and "nolock" nomenclature, let's align it. Since "nolock" is used in the public API it seems to have more mindshare so do that. The linked patch did this for the ALLOC_ flag but forgot about FPI_. Link: https://lore.kernel.org/20260715-spin-trylock-followup-v3-0-fc4d246f705d@google.com Link: https://lore.kernel.org/all/20260703-alloc-trylock-v5-1-c87b714e19d3@google.com/ Link: https://lore.kernel.org/20260715-spin-trylock-followup-v3-1-fc4d246f705d@google.com Signed-off-by: Brendan Jackman Reviewed-by: Zi Yan Reviewed-by: Vlastimil Babka (SUSE) Cc: David Hildenbrand Cc: Johannes Weiner Cc: Liam R. Howlett Cc: Lorenzo Stoakes Cc: Michal Hocko Cc: Michal Koutný Cc: Mike Rapoport Cc: Sebastian Andrzej Siewior Cc: Steven Rostedt Cc: Suren Baghdasaryan Cc: Tejun Heo Cc: Waiman Long Signed-off-by: Andrew Morton --- mm/page_alloc.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) --- a/mm/page_alloc.c~mm-page_alloc-rename-fpi_trylock-fpi_nolock +++ a/mm/page_alloc.c @@ -90,7 +90,7 @@ typedef int __bitwise fpi_t; #define FPI_TO_TAIL ((__force fpi_t)BIT(1)) /* Free the page without taking locks. Rely on trylock only. */ -#define FPI_TRYLOCK ((__force fpi_t)BIT(2)) +#define FPI_NOLOCK ((__force fpi_t)BIT(2)) /* free_pages_prepare() has already been called for page(s) being freed. */ #define FPI_PREPARED ((__force fpi_t)BIT(3)) @@ -1419,7 +1419,7 @@ static __always_inline bool __free_pages page_table_check_free(page, order); pgalloc_tag_sub(page, 1 << order); - if (!PageHighMem(page) && !(fpi_flags & FPI_TRYLOCK)) { + if (!PageHighMem(page) && !(fpi_flags & FPI_NOLOCK)) { debug_check_no_locks_freed(page_address(page), PAGE_SIZE << order); debug_check_no_obj_freed(page_address(page), @@ -1558,7 +1558,7 @@ static void free_one_page(struct zone *z struct llist_head *llhead; unsigned long flags; - if (unlikely(fpi_flags & FPI_TRYLOCK)) { + if (unlikely(fpi_flags & FPI_NOLOCK)) { if (!spin_trylock_irqsave(&zone->lock, flags)) { add_page_to_zone_llist(zone, page, order); return; @@ -1569,7 +1569,7 @@ static void free_one_page(struct zone *z /* The lock succeeded. Process deferred pages. */ llhead = &zone->trylock_free_pages; - if (unlikely(!llist_empty(llhead) && !(fpi_flags & FPI_TRYLOCK))) { + if (unlikely(!llist_empty(llhead) && !(fpi_flags & FPI_NOLOCK))) { struct llist_node *llnode; struct page *p, *tmp; @@ -2882,7 +2882,7 @@ static bool free_frozen_page_commit(stru if (pcp->free_count < (batch << CONFIG_PCP_BATCH_SCALE_MAX)) pcp->free_count += (1 << order); - if (unlikely(fpi_flags & FPI_TRYLOCK)) { + if (unlikely(fpi_flags & FPI_NOLOCK)) { /* * Do not attempt to take a zone lock. Let pcp->count get * over high mark temporarily. @@ -2979,7 +2979,7 @@ static void __free_frozen_pages(struct p migratetype = MIGRATE_MOVABLE; } - if (unlikely((fpi_flags & FPI_TRYLOCK) && IS_ENABLED(CONFIG_PREEMPT_RT) + if (unlikely((fpi_flags & FPI_NOLOCK) && IS_ENABLED(CONFIG_PREEMPT_RT) && (in_nmi() || in_hardirq()))) { add_page_to_zone_llist(zone, page, order); return; @@ -3002,7 +3002,7 @@ void free_frozen_pages(struct page *page void free_frozen_pages_nolock(struct page *page, unsigned int order) { - __free_frozen_pages(page, order, FPI_TRYLOCK); + __free_frozen_pages(page, order, FPI_NOLOCK); } /* @@ -5399,7 +5399,7 @@ out: if (memcg_kmem_online() && (gfp & __GFP_ACCOUNT) && page && unlikely(__memcg_kmem_charge_page(page, gfp, order) != 0)) { __free_frozen_pages(page, order, - alloc_flags & ALLOC_NOLOCK ? FPI_TRYLOCK : 0); + alloc_flags & ALLOC_NOLOCK ? FPI_NOLOCK : 0); page = NULL; } @@ -5522,7 +5522,7 @@ EXPORT_SYMBOL(__free_pages); */ void free_pages_nolock(struct page *page, unsigned int order) { - ___free_pages(page, order, FPI_TRYLOCK); + ___free_pages(page, order, FPI_NOLOCK); } /** _ Patches currently in -mm which might be from jackmanb@google.com are mm-page_alloc-drop-flag-conversion-optimisation.patch mm-secretmem-disable-under-highmem.patch mm-page_alloc-rename-alloc_trylock-alloc_nolock.patch mm-page_alloc-some-renames-to-clarify-alloc_flags-scopes.patch mm-name-some-args-in-a-function-declaration.patch mm-split-out-internal-page_alloch.patch mm-page_alloc-unify-__alloc_frozen_pages_noprof.patch mm-page_alloc-relax-gfp-warn-in-nolock-allocs.patch mm-move-some-stuff-to-mm-page_alloch.patch perf-x86-intel-use-higher-level-allocator-api.patch kvm-vmx-use-higher-level-allocator-api.patch x86-virt-use-higher-level-allocator-api.patch sgi-xp-use-higher-level-allocator-api.patch net-funeth-switch-to-higher-level-allocator-api.patch mm-remove-__alloc_pages_node.patch mm-move-__alloc_pages-to-mm-page_alloch.patch mm-replace-__gfp_no_codetag-with-alloc_no_codetag.patch mm-page_alloc-drop-alloc_flags-arg-from-alloc_flags_cma.patch mm-factor-out-can_spin_trylock.patch mm-page_alloc-rename-fpi_trylock-fpi_nolock.patch cgroup-cpuset-update-some-comments-about-the-page-allocator.patch mm-page_alloc-fixup-alloc_pages_nolock_noprof-comment.patch mm-page_alloc-remove-a-couple-of-vm_bug_onst.patch