From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D24603909B4 for ; Fri, 6 Mar 2026 17:53:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772819617; cv=none; b=g7P0e5PpEREH9R17QMqsamAD03rRbdrPleit0/fOcQrDINSTdY85E1Mvh5+mtRf8J6Y3OwHefNNpOr27QFcuratIdYsSn+3QVpDuoWAVsANtJdQ416zKfUfYtyX2A7VtYRiRY0F2DWVW/5RNpr1IUIrzfi2CpEqunPV0atEBT7k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772819617; c=relaxed/simple; bh=IK7f6ZZQLGH/8gc+FQtWRsI6EPYIrlFMQHhmz8jVhhE=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=ib0JSpcP/eVpctApaZ+LeIlJPh4LYdmGBszqgIlehgzocE5rQ2GTEsALncm4tR8eeQM5oV+cHrSu/ZnGUXc7U9vKbStoYZjS07SNhF38l1NOPzMn8IBX+LS/ULTqMKmq1Pfrn3bY2yd8z0Y8TJt5QjR/oCXBxRaWDx9B4H0G8kE= 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=IKxtYZjb; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="IKxtYZjb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D6DC9C4CEF7; Fri, 6 Mar 2026 17:53:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1772819617; bh=IK7f6ZZQLGH/8gc+FQtWRsI6EPYIrlFMQHhmz8jVhhE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=IKxtYZjb9FLFClr244MdACELVFVgUWT07gXuoO0sEpXa3yuBexHTqHCsQzcM4jTkt 3N9Si/HjWhBKlLxeKuMAt7xaf7p4h0HYjVCgv6GgbjwqIOe/8Moob5cUbzhzKA03ta pgBsWVmBidVkJQSlogXogMQknemrE26ElA//3D5w= Date: Fri, 6 Mar 2026 09:53:36 -0800 From: Andrew Morton To: Dmitry Ilvokhin Cc: David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Brendan Jackman , Johannes Weiner , Zi Yan , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@meta.com, Steven Rostedt Subject: Re: [PATCH 1/8] mm: use zone lock guard in reserve_highatomic_pageblock() Message-Id: <20260306095336.a79fcc869a7f6d2b2e97501b@linux-foundation.org> In-Reply-To: References: X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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-Transfer-Encoding: 7bit On Fri, 6 Mar 2026 16:05:35 +0000 Dmitry Ilvokhin wrote: > Use the newly introduced zone_lock_irqsave lock guard in > reserve_highatomic_pageblock() to replace the explicit lock/unlock and > goto out_unlock pattern with automatic scope-based cleanup. > > ... > > - zone_lock_irqsave(zone, flags); > + guard(zone_lock_irqsave)(zone); guard() is cute, but this patch adds a little overhead - defconfig page_alloc.o text increases by 32 bytes, presumably all in reserve_highatomic_pageblock(). More instructions, larger cache footprint. So we're adding a little overhead to every user's Linux machine for all time. In return for which the developers get a little convenience and maintainability. Is it worth it?