Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1715184rdb; Wed, 31 Jan 2024 07:07:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IGfOu4EyMvOE8bk/oK1gpDL4HBaOuXwtnxO7iwZp4zl++iVYbHpvUUaJe2r5w0FMyvU4tIe X-Received: by 2002:a17:903:2292:b0:1d7:4353:aba5 with SMTP id b18-20020a170903229200b001d74353aba5mr2382127plh.58.1706713638050; Wed, 31 Jan 2024 07:07:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706713638; cv=pass; d=google.com; s=arc-20160816; b=BSbXSb4DWcmVJ78sKQnxqEiAZtWgjTWDDb+Dek/AZ+gsieDvGaUFqNnEAQBPYoaXyV C/4aW5k7IoGscWazM948mtDXFkNYjZb9+lTXlDrEUaIPyMRG7PSskfDg3p/JRn0Zn/Au CVjO9Cvbe7nfUMNPFClbSQb+yy0wfUh0IjvBGPkaT8/Y9AcTYt2Wbgv6v4bKFog072nt 3J9P9YXWYwTG88JNtSfOPCjAfCq32lJ6kCMnsteCNk8Cko3GK1pqueyBzZLgUEqYVsj1 TjbPLVe2d7+IWd9IuidcNxm9Hg//sZOexsn8SMA+NQhMBacJNlC3B896L4DiS9PG6nAs IP5g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=l9+KWF3L5ml9HXib5kMluYTrfnQMxPltuvdn2zkfzFE=; fh=ct/5/UrXilz9SOM4krA1uLdbFrRYl4eRE6QWS6Wtjvc=; b=rxq1QH06u5hmSJNaVISEaUJHJQFp+ivOgGGA3KpiLyGrRn/ztKSfiUP4tzOWgqkYlm yD/TrzgHYFpdyhr8z/feZIE6pzrRw17sQlf+tVjd9kNVVu8JC5VgLM/as40p8Zey5i1p eukCzke5uiLNoJYs3P/kTmJXCMf4Rx4WtpUOqlQTGIFuyaf8+K987HiHpjZdWLhIkZKW FS4hpXgza1CQxYNkBW2CVRo2ncGApvUef2m+jA+zdpdvByCt0a8DFaHYa06Bt3kmvPmC Mo4ajeGQ7dmpB0rfuvgzw8DyK7WJepBbRkva5YoxV311RV54V6ojQDGlqrIHPqWTLJz7 R3vQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Xj4I9eDx; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-46610-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46610-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCXmr4TEgqbPI5j/r0whD/3K9XmKyzq6ObdqLp0REyIHzqtxMyf8EWCrkRaC5hGowmvbt3D2UzZQ0xqeSMpEY0MllRnsJBt/yfZUJVURXg== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id z3-20020a170903018300b001d8f8470f0asi4582146plg.66.2024.01.31.07.07.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 07:07:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46610-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Xj4I9eDx; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-46610-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46610-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 545E5B256E8 for ; Wed, 31 Jan 2024 14:35:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2EAF784A34; Wed, 31 Jan 2024 14:35:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Xj4I9eDx" 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 246D96D1BA; Wed, 31 Jan 2024 14:35:04 +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=1706711705; cv=none; b=t/T2qF10j8mmCvyR086tRlpuxatUB8wUgV6CZqhqYOmhYZvJvL1Y3JdEUZ4s3rn2C5N/ZtEUCxYDznK//wo/UVVdr7v2Ennv1E6m3Njn0z6UWgh63tDr58/mVp6mUl+F+9j+xHkWL8YsXE3/X0kFe/sCQM7hyUqZTFPkdEq17vs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706711705; c=relaxed/simple; bh=5EyZ4q/r+00v48OOg68MHvCQQPBQznBdJrnWimHOvoM=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=CH8Gb31O5Ho94/DSm6JEm6sbR+ejL7m4beGALwp3U2EA1wFKb3gTFFgZCeYzHw9Rl3xnUHpQ66gmqcarokkJNvU0cyiy4r//LsJq7h6wjcRaN5nt9czn/hyjK+ch4ZPpi6gGXnIU/9ojcHD1dRBJok+idla4w2PSdYVf/+fSQAk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Xj4I9eDx; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 98C11C4166B; Wed, 31 Jan 2024 14:35:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706711704; bh=5EyZ4q/r+00v48OOg68MHvCQQPBQznBdJrnWimHOvoM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Xj4I9eDx/4HbEu8yhW2vQwS+czjQUDgteKSBPmAbcovkQDof4vKf+Nti93zCxqUFy 8E1Mj2HVi6RuOgtLEDRS6zU9DOo9UxOfTl3GF9CkBNanL4l5F8UoUx1KrKXXLt2i2U QnSISdzQ04gQcHg39wQEs8qgdWVmlUTnN4etJo2k2D4fH2Zq8wh/KsRdbJfE9BZhqf wSLrMcR1e/pyRGTN71NKaOW1dupGCC6GoL9KwXzg+T9VFWwk6CPnbVno4VAvjIxm/E MkoGE8E4K5R88GIEhHdMDOn5hcozFNO/DhJ6spBg4F8LISArQUeNl8DwwemWCp403U gnR48sug9RyqQ== Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-5111c7d40deso2823136e87.1; Wed, 31 Jan 2024 06:35:04 -0800 (PST) X-Gm-Message-State: AOJu0YziwdGS6FqXazxxX9FwgdjIU8qcykRyBJwmNmMEVR6iBxdj9Ao5 TGrppM/pbG8USJFuoIG9fuN53fUD1C4GstX9Hr83CDgbQ2JeZV0d24Gx7QCOnkwWKKaWFqSve+7 lm3ZHroHJw6Bd2KDMGVLZNSnaSP4= X-Received: by 2002:a05:6512:470:b0:511:e8f:45ca with SMTP id x16-20020a056512047000b005110e8f45camr1454123lfd.31.1706711702790; Wed, 31 Jan 2024 06:35:02 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240127220026.1722399-1-yoann.congal@smile.fr> In-Reply-To: From: Masahiro Yamada Date: Wed, 31 Jan 2024 23:34:26 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] printk: Remove redundant CONFIG_BASE_SMALL To: Luis Chamberlain Cc: Yoann Congal , Josh Triplett , Petr Mladek , Steven Rostedt , John Ogness , Sergey Senozhatsky , x86@kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kbuild@vger.kernel.org, Geert Uytterhoeven , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Greg Kroah-Hartman , Jiri Slaby , Willem de Bruijn , Matthew Wilcox , Peter Zijlstra , Darren Hart , Davidlohr Bueso , =?UTF-8?Q?Andr=C3=A9_Almeida?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jan 30, 2024 at 1:00=E2=80=AFAM Luis Chamberlain wrote: > > You wanna address the printk maintainers, which I've added now. > And Josh as he's interested in tiny linux. > > On Sat, Jan 27, 2024 at 11:00:26PM +0100, Yoann Congal wrote: > > CONFIG_BASE_SMALL is currently a type int but is only used as a boolean > > equivalent to !CONFIG_BASE_FULL. > > > > So, remove it entirely and move every usage to !CONFIG_BASE_FULL. > > Thanks for doing this. > > > In addition, recent kconfig changes (see the discussion in Closes: tag) > > revealed that using: > > config SOMETHING > > default "some value" if X > > does not work as expected if X is not of type bool. > > We should see if we can get kconfig to warn on this type of use. > Also note that this was reported long ago by Vegard Nossum but he > never really sent a fix [0] as I suggested, so thanks for doing this > work. > > [0] https://lkml.iu.edu/hypermail/linux/kernel/2110.2/02402.html It is good to know that this issue was already pointed out in the past. > You should mention the one case which this patch fixes is: > > > CONFIG_BASE_SMALL was used that way in init/Kconfig: > > config LOG_CPU_MAX_BUF_SHIFT > > default 12 if !BASE_SMALL > > default 0 if BASE_SMALL > > You should then mention this has been using 12 for a long time now > for BASE_SMALL, and so this patch is a functional fix for those > who used BASE_SMALL and wanted a smaller printk buffer contribtion per > cpu. The contribution was only per CPU, and since BASE_SMALL systems > likely don't have many CPUs the impact of this was relatively small, > 4 KiB per CPU. This patch fixes that back down to 0 KiB per CPU. > > So in practice I'd imagine this fix is not critical to stable. However > if folks do want it backported I'll note BAS_FULL has been around since > we started with git on Linux so it should backport just fine. > > > diff --git a/init/Kconfig b/init/Kconfig > > index 8d4e836e1b6b1..877b3f6f0e605 100644 > > --- a/init/Kconfig > > +++ b/init/Kconfig > > @@ -734,8 +734,8 @@ config LOG_CPU_MAX_BUF_SHIFT > > int "CPU kernel log buffer size contribution (13 =3D> 8 KB, 17 = =3D> 128KB)" > > depends on SMP > > range 0 21 > > - default 12 if !BASE_SMALL > > - default 0 if BASE_SMALL > > + default 12 if BASE_FULL > > + default 0 > > depends on PRINTK > > help > > This option allows to increase the default ring buffer size > > This is the only functional change, it is a fix, so please address > this in a separate small patch where you can go into all the above > details about its issue and implications of fixing this as per my > note above. > > Then you can address a separate patch which addresses the move of > BASE_SMALL users to BASE_FULL so to remove BASE_SMALL, that is > because that commit would have no functional changes and it makes > it easier to review. > > Luis Splitting this into two patches sounds fine to me. Either is fine. Up to the printk maintainer. Anyway, this patch looks good: Reviewed-by: Masahiro Yamada --=20 Best Regards Masahiro Yamada