Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp509234lqp; Thu, 4 Apr 2024 23:37:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVNwEqP/kNsEC7OOlfCI7Cm8QgriP1sp4NTCf9ot1wZdUTr2ElvZiz8y4mFLza0ruLBLCObbHAAPeczwuhFqhBCjuR6ZVx4VYcxoTgZXw== X-Google-Smtp-Source: AGHT+IHyQhzAv6IAgUA6QJHaf8CyeynuiU6vBYsbulXQIZOOPAHP+40EXNX1BHQz0ErY+t1we3XR X-Received: by 2002:a05:6358:7291:b0:17f:58cb:2d3a with SMTP id w17-20020a056358729100b0017f58cb2d3amr575103rwf.19.1712299027244; Thu, 04 Apr 2024 23:37:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712299027; cv=pass; d=google.com; s=arc-20160816; b=UtkHUwaxcYOqCTJeqO/G+u37M7BdkO9jAGoFK82qDyMJSCS+ah3k65wEgQlpqtZzhY /ps5Q8qc7A2Oy31Iix08bnLKug455QtaM9Lzjcf2cfkaN/nTPFw60DgFGk+e98iZfq1I fnbERemBhmletlYwXAH+26Uiw2L91CeKa2ozODDufKxaskZVwm2xLD7NdA8D6YPYNGPd V5J7LewOvCdmGURpKZz2i7gF8ci4dGNpAbTEQo+6JsFOoKFytvAPIM1fBf56lrFYAJEw If6pO7blOEtCRgq9JKdv4mgn9vZbyQTnlQAVNGb0bpXoffXKTIA/rPmFrDspCOUyQ96s QPMg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=77qvtWsnDnigq2wkv7E1K4qXedaAPgyJK3MjEuJ0owQ=; fh=U+ZTSbzUK1V07APKTee5LbNfqTdOOL5/YLixLOWMf84=; b=ztkd1/LF9Yn3YDGROaVGldJBZsqS7+mlntH8sRlCM1k/B0Foc5hEHWkXR8P9jz0OWF Jy6FzJi0AqDinkhDoLMLZlr4uIkUxpo7hoZtXRn5O+cRMJDCxeJANQTtZzXxc4Vt2XG9 Y4Hp8/ocvG0b3G/TqC2b6GSyUuj+o0bZ0RkQAguC7HUGbtl2xmiR4spbb+IDGlgXFzLX eLC84ucKSwKWDSuaifRicwA6T670wiyTqHYxyE41xnyJGFMXvGhI4lnjcGCxl/85L0sj 6+EMDJ29BLekBaoMwcwlDyyvddJtK/monOydYYZ1p2U0CEwyu6uIA9x7VhdKcHpY38tq XL8A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DGZ39aBW; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-132477-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132477-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id b127-20020a636785000000b005f0a53d3cc5si810474pgc.742.2024.04.04.23.37.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 23:37:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-132477-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DGZ39aBW; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-132477-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132477-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id E0B972850E6 for ; Fri, 5 Apr 2024 06:37:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 13D7D22F0C; Fri, 5 Apr 2024 06:36:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="DGZ39aBW" 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 3C8DD1BF27; Fri, 5 Apr 2024 06:36:06 +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=1712298967; cv=none; b=uVpdI5G2UhRD1lDqr+O3SPY/sF6UthhPk8Whmk5fs0PY0SIwDFRkk3cwH0ojYsMqlNz1JQL8an3sLvwVRyC8IYKHpy58LFrII5ACZ7vC7wDkprOSf6nF+srtcyR3AEaC5MvX1QCCvtPPdwlZvxCWFg7u1HuV3172iBf9q6GhBDU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712298967; c=relaxed/simple; bh=rCXu4epE+VTWM+HBe7qOASe0JtrD/GpcjyADbon9iVs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=o0VW+TLvSl3K2aWKUk3yQG+y5Ms9r7MXGwOtkCQnXwiefKfvUGiWgXV3Tz5klq38YOSPSBVYbkMGdg7ZNcXJ1ON/E+qGGOAusupjvROoCnogGweGtM9zK+qQe8r8QKHO/Wd3rMzXMJ3utpkXlfOYkh3sOIvLIjBgFyGGqlfmoq8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=DGZ39aBW; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 26CC8C433F1; Fri, 5 Apr 2024 06:36:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1712298966; bh=rCXu4epE+VTWM+HBe7qOASe0JtrD/GpcjyADbon9iVs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DGZ39aBWy9/eqltVfphM20ylODyQHL41s0ElfcCxmn4adpCjvZ8Ao3elLDEF1XZ33 knS88Iz28eXrQVzqaBl2Y7wZ9ONDhQQu94OtFzIz+57OEfLAVrXTMBQWe7agDYzwRy Niw4LIgk39SLdroDUEAdr3Ctyif8EynxXv3DimyU= Date: Fri, 5 Apr 2024 08:36:03 +0200 From: Greg KH To: Matthew Wilcox Cc: Sasha Levin , stable@vger.kernel.org, Rik van Riel , Mel Gorman , Peter Zijlstra , Ingo Molnar , Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: FAILED: Patch "bounds: support non-power-of-two CONFIG_NR_CPUS" failed to apply to 5.4-stable tree Message-ID: <2024040545-diligence-suffrage-d430@gregkh> References: <20240327122125.2836828-1-sashal@kernel.org> <2024032935-antsy-imitation-1453@gregkh> <2024032959-ladies-circling-3a5e@gregkh> 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 Tue, Apr 02, 2024 at 06:33:55AM +0100, Matthew Wilcox wrote: > On Fri, Mar 29, 2024 at 06:05:20PM +0100, Greg KH wrote: > > On Fri, Mar 29, 2024 at 02:34:43PM +0100, Greg KH wrote: > > > On Wed, Mar 27, 2024 at 02:10:10PM +0000, Matthew Wilcox wrote: > > > > On Wed, Mar 27, 2024 at 08:21:25AM -0400, Sasha Levin wrote: > > > > > The patch below does not apply to the 5.4-stable tree. > > > > > If someone wants it applied there, or to any other stable or longterm > > > > > tree, then please email the backport, including the original git commit > > > > > id to . > > > > > > > > Looks like you just need a little more fuzz on the patch. > > > > > > > > diff --git a/kernel/bounds.c b/kernel/bounds.c > > > > index 9795d75b09b2..a94e3769347e 100644 > > > > --- a/kernel/bounds.c > > > > +++ b/kernel/bounds.c > > > > @@ -19,7 +19,7 @@ int main(void) > > > > DEFINE(NR_PAGEFLAGS, __NR_PAGEFLAGS); > > > > DEFINE(MAX_NR_ZONES, __MAX_NR_ZONES); > > > > #ifdef CONFIG_SMP > > > > - DEFINE(NR_CPUS_BITS, ilog2(CONFIG_NR_CPUS)); > > > > + DEFINE(NR_CPUS_BITS, bits_per(CONFIG_NR_CPUS)); > > > > #endif > > > > DEFINE(SPINLOCK_SIZE, sizeof(spinlock_t)); > > > > /* End of constants */ > > > > > > Now fuzzed, thanks. > > > > But it breaks the build on 4.19.y, so I'll go drop it from there. If > > you want it added there, please provide a working fix. > > Looks like bits_per() didn't exist in 4.19. It was added as part of commit 69842cba9ace84849bb9b8edcdf2cefccd97901c > Author: Patrick Bellasi > Date: Fri Jun 21 09:42:02 2019 +0100 > > sched/uclamp: Add CPU's clamp buckets refcounting > > Up to you; I can provide bits_per() to 4.19 which will aid backporting > other fixes (we currently have 17 uses of bits_per() in 6.9), or we can > just drop this whole thing for 4.19. > At this point in time for 4.19, unless it's really criticial, I would just say drop it. thanks, greg k-h