From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6C7523AD519 for ; Wed, 8 Apr 2026 16:42:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775666541; cv=none; b=gdYPm1F8RlniqLeLflqCdRGVn+detnLp0+6gLbPRju67/tZuiuwhR9QLTxdXLB0YED1EJyRtyg+RsymFtpcIrsTnpBYY7qIngWOsU0JG8ydVgHxuLnQmate/0avlprVmv5KywKwxfwqUilW4mVmdvVWgFusF45JZgO7caLvNvvM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775666541; c=relaxed/simple; bh=tKF0KDg1yL97xohh1US461WWrUeRwT5E04h7vCwtbRM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kqU/Lq3qdRtdN5QH4xLSLsIg3zNqLoC7ceX2ObQOxLM1Sxq96Vh4ifKLalcDif6k8YywqS5AHjI/oeZsRMLxmjUsprdBTEc5LWHNwegKuScY2yhYpmvkTTiZBouLvX55DJA0ut51d/ZxHy23Qz0pwxEQfJwZeN+9cmxu0HWM25c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=JRxUYrt8; arc=none smtp.client-ip=209.85.221.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="JRxUYrt8" Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-43cf3ee0fc1so790352f8f.1 for ; Wed, 08 Apr 2026 09:42:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1775666538; x=1776271338; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=QIK4dvbBCacea2XmbH1X9fhSsvJ+R6maIp66zH6uBkM=; b=JRxUYrt8OtIG85BBWMumzEv570yQjyx/nRofmodB8F3EQfw63HcXqx9acY4zkWzxR8 jWsQbjfTRlFQU//QGko2amL+D2HY/dI7XjYlS9CI0aXwEKGA0bC4qlLZjyw6KoMLAEg+ QvAiTsn41C8eE/LBgneLOzYWwjkFGIlh5BDB4pso7l8U+qW0vGvlPt1PpMUPG31OCPfg ZwzMhEk32YSL9qz22QlCMnuWXh1b+NA0PRbnqbWqnbQmB2GdqJoAHqEn4rDL2XN+Tv8I SdGR98fa3wo+lcZ/0Sacq6ZaSYVZZZR3EbcLlDYC+/98ONc5TGq5pz3jixWepERaEcWK YfxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775666538; x=1776271338; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QIK4dvbBCacea2XmbH1X9fhSsvJ+R6maIp66zH6uBkM=; b=MRYknSU7ICnlOsUVSs45xgERxIzx2V6FBts5003sJR4OAx6dkNdU+mgfNJUl3cgggv /6QxG9HTcv3SzE6n1LDf7UZkJFlKUVDpkfG5QOasRwpjEIZ5jxX5Z4yqtTcqEUJFTF+2 D5dfusw/XkInCw0yFPSzh/UaxHMf3CxqH6B62WNZKN0OYVDxP4KW3/t06UgzfjLjgeH3 OH//HyJPLYH/Oq0auIpt+SmOBwyvnnTTQe/WXKQN3V8jB/45q6LXD77LB0zulWmz1z1j mdFIYmaEAZvosOFZxlopEMj8qMpIIC+XzZ2LEOO1RIu01V9ZOWdMyJPbKKthnJWzOJfD nVIw== X-Forwarded-Encrypted: i=1; AJvYcCXQ6xIJ8qrOE4O742CQzNsFTfsLuLq52nRpyoNbXrwdORhL/1sa688NRzw2Y6UbLq0UocsiOuvRDwRGDd8=@vger.kernel.org X-Gm-Message-State: AOJu0YyJ+7DXynhDh28wRFbiPF0ScfxVRRJWDMqhYKIhIXlghyLhVbjw 4kQL3h8xP08UQB/QVLBxWjvxFAENp/BSuuKKGsgJFLD8TsvIpVEL6jSy0zgBgls8SPLYt+1l6zO 4lK+s8N4= X-Gm-Gg: AeBDievGH5EZuhw7IWgKiC6iOgGjDrOZlpTblgQgI/vQA/yPnKk7pNybDaWgnILIRqq 13bA13ovo65an+uCpnCAH53YWfQL53d79EvdVRh9MSNN2G6yuzg3OQOOzRqIrPzVjL0iTr+3fz1 qRLUzib0W93/ln9M8UJpATnm4jW10PvLB8H5y0s2/zmWF2Cks22FY4sO8Kj2OanLYFAPhwojxpo Isu7+hvjEea8PbuYN39LzbrK/FzDSV1UJ4aAN1kYaqutL5OJmkoiwpWxSPIGGIYgsHQXFI/0GTx O0TdZc/O8ibCSTwvpgZnTyprMWMCMIJ1IPmkPL3h4DXMVNXmMrKudpjtVIoqqYjGxWxWMQWIFcb MwhPJrwUd+vcVWy1y1rF9QG9kRtg4Go02wFzWpzRzAGCaEh69D81pVp6cYv9mJXUrBBd8ikmyLZ KPFBQlDsc+XoMA6Og2bSZooby7/dm6xZy+FFvk X-Received: by 2002:a05:6000:471e:b0:43b:940a:3457 with SMTP id ffacd0b85a97d-43d595e0467mr218166f8f.28.1775666537708; Wed, 08 Apr 2026 09:42:17 -0700 (PDT) Received: from localhost (109-81-88-253.rct.o2.cz. [109.81.88.253]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43d214f2b63sm54258674f8f.28.2026.04.08.09.42.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Apr 2026 09:42:17 -0700 (PDT) Date: Wed, 8 Apr 2026 18:42:16 +0200 From: Michal Hocko To: Dmitry Ilvokhin Cc: Andrew Morton , Vlastimil Babka , Suren Baghdasaryan , Brendan Jackman , Johannes Weiner , Zi Yan , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@meta.com, Steven Rostedt Subject: Re: [RESEND PATCH v2 0/8] mm: use spinlock guards for zone lock Message-ID: References: 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: On Wed 08-04-26 13:33:15, Dmitry Ilvokhin wrote: > Resending v2 to get feedback from folks who work with this code, as > Andrew suggested. > > This series uses spinlock guard for zone lock 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-stable. > > Suggested-by: Steven Rostedt > > v1 -> v2: > > - Andrew Morton raised concerns about binary size increase in v1. > Peter Zijlstra has since fixed the underlying issue in the guards > infrastructure in tip [1]. Note: the fix is not yet in mm-stable, so > it needs to be applied first to reproduce these results. With that > fix, bloat-o-meter on x86 defconfig shows a net decrease of 49 bytes > (-0.12%) for page_alloc.o. > - Rebased on mm-stable, since the patch this series depended on was > dropped from mm-new. > - Converted guard(zone_lock_irqsave)(zone) to > guard(spinlock_irqsave)(&zone->lock). > - Dropped redundant braces in unreserve_highatomic_pageblock() > (Steven Rostedt) > > v2: https://lore.kernel.org/all/cover.1774627568.git.d@ilvokhin.com/ > v1: https://lore.kernel.org/all/cover.1772811429.git.d@ilvokhin.com/ > > [1]: https://lore.kernel.org/all/20260309164516.GE606826@noisy.programming.kicks-ass.net/ > > 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() > > mm/page_alloc.c | 53 ++++++++++++----------------------- > mm/page_isolation.c | 67 +++++++++++++++++++-------------------------- > 2 files changed, 45 insertions(+), 75 deletions(-) I like the resulting code. For the whole series. Acked-by: Michal Hocko -- Michal Hocko SUSE Labs