From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.ilvokhin.com (mail.ilvokhin.com [178.62.254.231]) (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 54C7336606C for ; Fri, 6 Mar 2026 16:06:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.62.254.231 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772813188; cv=none; b=m2KTREFYII66sPHIBdQOe1+R9US0qzktT5kXz62RC7WKAx/b4xcNlHGezQ3+aFdvk/cHQlSeUuLsFWiiIM52joARolRR2T/AiQs8mrT9NIWudSiELFPe5HyioYtSutyhAdye53rutN8JNpugAixsiFsT6O7MRzkAWFEGsjBgJmQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772813188; c=relaxed/simple; bh=HuG8aVR7jyBKNg8jUJqlgW80RJQ0MWHmVNfedjaF2YY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=evF4VjKH14Moo+jzXKtYtwXyRZUTuduoMUiT7piDideWxJCMeD20Q93E1FeNTVp0dZaLKipZuPzHL8et1IJMZ1drtppLUayBQQ3vhvs48X/va18xucxpFbiqnl8jTN1vKDccEt22rPRQ2LnwKLp+91i+J2nQxPgOJG3Mx8wSo3I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=ilvokhin.com; spf=pass smtp.mailfrom=ilvokhin.com; dkim=pass (1024-bit key) header.d=ilvokhin.com header.i=@ilvokhin.com header.b=H2V38ufF; arc=none smtp.client-ip=178.62.254.231 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=ilvokhin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ilvokhin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ilvokhin.com header.i=@ilvokhin.com header.b="H2V38ufF" Received: from localhost.localdomain (shell.ilvokhin.com [138.68.190.75]) (Authenticated sender: d@ilvokhin.com) by mail.ilvokhin.com (Postfix) with ESMTPSA id 2958CB3439; Fri, 06 Mar 2026 16:06:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ilvokhin.com; s=mail; t=1772813184; bh=pGDQ9Ydxn2jbdNgrbPTdlWBfprirVVZp7HKCQ8LPMyE=; h=From:To:Cc:Subject:Date; b=H2V38ufFgO3maqA5ljthXDrLz6D6nZPRqy/jTmgXGUvxKW7JhUBznsHXj2DCJd8qs H1zPSvOXgdtniNKgZN8iRubFjD5tbtmDAFT5EqFlziUv1hmW4wy0SaUMPH/ElWrAzh 0H3+9OewstRjdr3rMGOpg+vkOoCX9eISw97tMBSM= From: Dmitry Ilvokhin To: Andrew Morton , David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Brendan Jackman , Johannes Weiner , Zi Yan Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@meta.com, Dmitry Ilvokhin , Steven Rostedt Subject: [PATCH 0/8] mm: introduce zone lock guards Date: Fri, 6 Mar 2026 16:05:34 +0000 Message-ID: X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This series defines DEFINE_LOCK_GUARD_1 for zone_lock_irqsave and uses it across several mm functions to replace explicit lock/unlock patterns with automatic scope-based cleanup. This simplifies the control flow by removing 'flags' variables, goto labels, and redundant unlock calls. Patches are ordered by decreasing value. The first six patches simplify the control flow by removing gotos, multiple unlock paths, or 'ret' variables. The last two are simpler lock/unlock pair conversions that only remove 'flags' and can be dropped if considered unnecessary churn. Based on mm-new. Suggested-by: Steven Rostedt Dmitry Ilvokhin (8): mm: use zone lock guard in reserve_highatomic_pageblock() mm: use zone lock guard in unset_migratetype_isolate() mm: use zone lock guard in unreserve_highatomic_pageblock() mm: use zone lock guard in set_migratetype_isolate() mm: use zone lock guard in take_page_off_buddy() mm: use zone lock guard in put_page_back_buddy() mm: use zone lock guard in free_pcppages_bulk() mm: use zone lock guard in __offline_isolated_pages() include/linux/mmzone_lock.h | 9 +++++ mm/page_alloc.c | 50 +++++++++------------------ mm/page_isolation.c | 67 ++++++++++++++++--------------------- 3 files changed, 53 insertions(+), 73 deletions(-) -- 2.47.3