From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yw1-f177.google.com (mail-yw1-f177.google.com [209.85.128.177]) (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 22B17335565 for ; Thu, 18 Dec 2025 08:35:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766046915; cv=none; b=fX2xbML1DpKiNedFhGtIDxHWog3xQOXHXevDgoeCBBao+0aSkstBF387RQi1l1AlbMfvdtSFG8Xgds+dKLgfQ41X8FNwRL3PYzWxlYKUUEGpCQLpv50A1wAiwtSGmVfDgRBUWUOgylmcKf89a+ueGcO5Z5JxwzZ0doo9hVQOGBI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766046915; c=relaxed/simple; bh=Cxth295ULS3sXBcfuPPF1SPAHTEztiILr8X6QeA0IUA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PpZs1PT9Os4P6YCUJZb7jWQpk8VE05pYQPvNJOAlTaGFXQSCShoQM+pSlxwsyHrS/3YCm5YGpZjzWXNHd+fvAGcwF5RWJ7FMo/a/jGWccbypTnz8COCZpy/CY90nT47Jectp9wYzOHDGzluLXKe/GtoXgG629LAXQNZ2vbB1baY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Uw6oJsNh; arc=none smtp.client-ip=209.85.128.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Uw6oJsNh" Received: by mail-yw1-f177.google.com with SMTP id 00721157ae682-786d1658793so2706767b3.1 for ; Thu, 18 Dec 2025 00:35:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766046913; x=1766651713; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=IGOD5AKxuXAri7NlUCgiMMy4tdnFDqyp4xUV8NE9qCo=; b=Uw6oJsNh2+kVhMw3oKa+EOaEHHNsqOWyBhMMmSX1frQD3/TYs0Kr31zwTiNgeRY7jB /qhiTTuB4XIUYUlt24iuxPjzSeGtHl/7KfZESMgPKJyPX5ZyCVHbtl1/Hmmgk6rKYSsD 2f9/bXTMu73dV36oEm46S+n2DSA1YuznimK4SBFwzJ11/7FDzGOOj5J6UfH6+e8qAl9D qY9PUHR/9BhA0uOBmwJbhgvAtOKFjuY4Ln687Q8YoTSR4AquZlJRj0BXwuQVOssHe2am pbsj4wU1g/83XI+y8kcvs+F+9yXgs3jAV0utiBiX38LKpeiCj+5EQP9aqVqyvPIwsc41 +iWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766046913; x=1766651713; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=IGOD5AKxuXAri7NlUCgiMMy4tdnFDqyp4xUV8NE9qCo=; b=iVhACLnIlJ74aXg8DmQKaXwg7/mGqa85CvDHhjN+ygDCLi29o4RoAUyeIbBolJtFZ2 HGGTr5JNsN8MGEbLksPnkeB5qTvZ717P9hN3xhFiB2z8XDKVOV1SyM6FNDfjupIquV7c ZOhQzXjha0o6idEMZJTduvi9+Z65ZyyhjRPMWOQouCMxFGjIM9lzjfFqIAY2PJQYege+ NXSoy4UzJ01dKrddzBUiowrcbgh92O5vyutXT8RW0MyXCj1P+PIHaCOaaewF/5eOa9hR 0IL7zk9zM4u5zi/8Smkl4nSKMLFzMc2TRC7++tYBVe495zgE2MAQ4r7UdDZIBEcF0fAf QwWg== X-Forwarded-Encrypted: i=1; AJvYcCVCGdAkcJiGWylOtmKVJ6wrAXKEeIWc7u4cXizxPkpXn8mIT/KDPr7rznHCeo2uHqJdmeC0GTH5TI0dsE8=@vger.kernel.org X-Gm-Message-State: AOJu0YzzyfnIezYVLNUM1EeXAjLyE/WxNFCKC3FJcNc06oL5v2dH6ljC JjSCswbguX0lj74NcON7tYnjPEO0MidZnPdNHgxEtBXlfg33pHvsipoA X-Gm-Gg: AY/fxX7/0vJ1R/HZoFjXnHOplkSC8l2s/7cJRNwlJxVmKu1XQ89nPvlCBmMEFcKlUen 6B77ZYWtxt30dHyWSZqhH8a7mZYLmWIYs6UpNFiZ3rUVfjXbjijw4KqLn/TFVWOideBrARGtBBi Kte/FbbdtFa0YdSqoBNXO6iD1U0p4CEX++S2qdnTU1GIvZdnZLbNm5U8CM1G/812btEQeok2cnt UIAO9NZBued0uXin/oVmT0gcZXDZXM4MzicMo8TMZbkBXU/AzYBBWAltrAdrzNSUGdmO0ddTroo RSEvsnuBm3ooGOeKxsNgi/BNQN0U1kNTgVrJSKvNsmOWLKQjA/RDPPGfEJB8m6RSSUJoXqPrZWd M+OCjPRjJMy+NdQw07TzyjTm7NOuqXeKOU3U92ZcWV+OeRlfCgEbLGoVsWlQf5FoWo9745XK0Hh 8HrREqaBRpLyG6gVWjbtoObsRp+1OE+Yef X-Google-Smtp-Source: AGHT+IGSXiTTGUVkqZzEJxFvMPmfIzE+x47nd9kcu5QbUqyM1nRZWHFpaROFvrFRIej72RU9uKwDYA== X-Received: by 2002:a05:690c:620f:b0:78f:984b:4bb5 with SMTP id 00721157ae682-78f984b50d8mr74915957b3.64.1766046912988; Thu, 18 Dec 2025 00:35:12 -0800 (PST) Received: from localhost ([2a03:2880:25ff:40::]) by smtp.gmail.com with ESMTPSA id 956f58d0204a3-646637ad87bsm800456d50.22.2025.12.18.00.35.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Dec 2025 00:35:11 -0800 (PST) From: Joshua Hahn To: Guenter Roeck Cc: Andrew Morton , Daniel Palmer , Brendan Jackman , Johannes Weiner , Michal Hocko , Suren Baghdasaryan , Vlastimil Babka , Zi Yan , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH] mm/page_alloc: restore 0-handling to zone_set_pageset_high_and_batch Date: Thu, 18 Dec 2025 00:35:09 -0800 Message-ID: <20251218083510.2462817-1-joshua.hahnjy@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Wed, 17 Dec 2025 08:47:12 -0800 Guenter Roeck wrote: > On Tue, Dec 16, 2025 at 10:05:03PM -0800, Joshua Hahn wrote: > > Commit 2783088ef24e ("mm/page_alloc: prevent reporting pcp->batch = 0") > > moved the error handling (0-handling) of zone_batchsize from its > > callers to inside the function. However, the commit left out the error > > handling for the NOMMU case, leading to deadlocks on NOMMU systems. > > > > Since in the NOMMU case the reported-to-user batchsize should still be 0, > > we would only like the error handling to exist in the callsites that > > set the internal value for the zone (i.e. zone_set_pageset_high_and_batch). > > > > Restore max(1, zone_batchsize(zone)) to the callsite to prevent errors > > on NOMMU systems. > > > > Fixes: 2783088ef24e ("mm/page_alloc: prevent reporting pcp->batch = 0") > > Reported-by: Daniel Palmer > > Closes: https://lore.kernel.org/linux-mm/CAFr9PX=_HaM3_xPtTiBn5Gw5-0xcRpawpJ02NStfdr0khF2k7g@mail.gmail.com/ > > Reported-by: Guenter Roeck > > Closes: https://lore.kernel.org/all/42143500-c380-41fe-815c-696c17241506@roeck-us.net/ > > Signed-off-by: Joshua Hahn > > For m68k:mcf5208evb boot tests with qemu: > > Tested-by: Guenter Roeck > > Guenter Hello Guenter, thank you so much for spending the time to test my patch! I've gone ahead and took Vlastimil's suggestion, which just returns 1 for zone_batchsize for NOMMU systems. Functionally, it should be the same but I thought it might be best not to carry the tested-by tag over, since the code changed in its implementation. Thank you again for testing the code, and sorry for the bug in the first place. Have a great day! Joshua