From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-177.mta1.migadu.com (out-177.mta1.migadu.com [95.215.58.177]) (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 8B33E1DE4FB for ; Tue, 23 Jun 2026 21:17:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782249461; cv=none; b=RHdnlqeoqn+PG9+POrfgpgdT1LLy913NohoVXPOzNtlDYLmuTBjC9UqwbhIusRVJRQGoxUrsuRMMIfkn5Q47EybTtx/CVWedgYrqTVIoaIyjy1yAS24TS1iUWRrYUsAmu6YKtA7kbQb1rPO9xjf+Z5JoZgy2NzjCJCU9MUqIEgM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782249461; c=relaxed/simple; bh=x8wxaD30ywyOHmvTqM2HSivJHASkHdTQB0Kp7ojJV4g=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DwVAFy8pMtFJs0CLJFbnEgf1gBzJHO8ytHxgpJd+yX5mb/gND8o0O7eSeE2jE9TgQRS86cpyHmO2CNNI3QwuI+VwBmDCe0iRKyja4DbIYsHRrFUj2sY+AG6fh8zYBt5VsTcC2B43mqhZrOSorllK8ykN36oE+aZoQvr1U23G2iU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=EiiAa4bX; arc=none smtp.client-ip=95.215.58.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="EiiAa4bX" Date: Tue, 23 Jun 2026 14:17:25 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1782249457; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=p3MOrrXNnFkBZPkEQOlLJbV9bk56PLzLI3wAWmrou28=; b=EiiAa4bXexlgD2tCzip5KVShTk55r+tRf39OnOz1UwDf/PGoi5WCIozL1Ojag+kyli7rgY OEV/xFU9XpGHPab2WVGmAAE915MwDmFvwZ5vEkdyl4hIoSIbHhkg43Lz6LoYKgzt390LSS SOyFlfHYa8fRWhM6g3neG4A2VnYvU9k= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Shakeel Butt To: JP Kobryn Cc: akpm@linux-foundation.org, david@kernel.org, ljs@kernel.org, liam@infradead.org, vbabka@kernel.org, rppt@kernel.org, surenb@google.com, mhocko@suse.com, jackmanb@google.com, hannes@cmpxchg.org, ziy@nvidia.com, fvdl@google.com, linux-mm@kvack.org, usama.arif@linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] mm/page_alloc: use existing highatomic reserves on the buddy fastpath Message-ID: References: <20260623004600.113347-1-jp.kobryn@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260623004600.113347-1-jp.kobryn@linux.dev> X-Migadu-Flow: FLOW_OUT On Mon, Jun 22, 2026 at 05:46:00PM -0700, JP Kobryn wrote: > ALLOC_HIGHATOMIC currently provides both access to MIGRATE_HIGHATOMIC free > pages and permission to create new highatomic pageblock reserves. This > makes it unsuitable for the fastpath. > > However, the fastpath can reach rmqueue_buddy() while MIGRATE_HIGHATOMIC > reserves have free pages available. In this situation, the allocation can > fall back to other migratetypes without trying those reserves first. > > Allow high-priority non-blocking allocations to use existing > MIGRATE_HIGHATOMIC reserves on the buddy fastpath without growing them. > First tighten the criteria for reserving pageblocks so that growth may only > occur in the slowpath. Then allow fastpath usage by enabling > ALLOC_HIGHATOMIC when the GFP mask describes a non-blocking high-priority > allocation. This logic has been factored out from gfp_to_alloc_flags() to a > new function gfp_to_alloc_flags_nonblocking(). > > A UDP receive workload was run with free MIGRATE_HIGHATOMIC pageblocks > available in the target zone. Before this patch, the workload did not > consume these blocks. With this patch, eligible order-1 allocations > reaching the buddy path consumed existing MIGRATE_HIGHATOMIC pageblocks, > with no highatomic misses observed. The workload did not grow highatomic > reserves and NAPI page-frag allocations remained healthy with no failures > or order-0 fallbacks. > > Signed-off-by: JP Kobryn This is awesome. Reviewed-by: Shakeel Butt