Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp525880rdb; Mon, 29 Jan 2024 09:20:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IHeWXUdc7miVwVhJtJ3+TFdCK9hEQpCf3V0NSQHdU8gOEXojbrac/QtOtx+rNz7MiV6J6U8 X-Received: by 2002:a05:620a:2f0:b0:783:792c:966 with SMTP id a16-20020a05620a02f000b00783792c0966mr5856291qko.65.1706548804760; Mon, 29 Jan 2024 09:20:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706548804; cv=pass; d=google.com; s=arc-20160816; b=O+8kgHegVhJa2n5wra4xpcgoEVRec+nojUhnS+aRmu7ycjaGCCPk4GgWfbNDaPeOWb 2pTihImPK6dJ1Q04p+ZbcmKjcMO8spVG6f/GBfci+WwDDHuX6mNN8w+t2prjVF8rXjn1 zqg1KqvJVJwO7j3YAg7BG2kLA+6KGKK+NXGY0+AiTMky2dWC3snYLYDWqN4A3rB3hthd TsRYZqzj8hnwJIM2BCZvpuW1ts4YvYaMZx/uuwqsw5ia8cDbLXF00I7kHUyX6sAYXoXX AIFa/iUf+vvCQIxfVRr9mtoEn5Jikw0p6GIr8r8ap/FG3LyharCMMamlK2rCwGMJak8s TxWA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender: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=pBVtJRmqf+crBbobrGzBK2lFMDtFqvFaWK9LtbdMiw0=; fh=M/j+7+gofGnxX93GxjwBsfKi10c6v090GnMhMWU15T0=; b=sor7fTlV4REUuBdKJq64BeAl79u/0k7ueIT8Z22j9YfCNYHnizvLsBI5PYqZ4NuOU9 xIKh86szVB1FThKHQtoMy9/ql5aVVKSltyY+CqnxuxNtunlXOPTYMukBpSpO/lvjdsFC D7AYf5xxwR/lNq8CDfiiyKKRpzG6oompNbN2nzPB41huP3b+ZLyXggS6X9lF5m1Y9AWk VzLhkhvA0K4Hsr7Gx4K536ACvElIkJTxweX072mng1dZxEK6F7MTP043dZA88ExmUjxJ Iq7yLQRsRK5ZhK0hEjzDi2weDmlcErM1KSLoa50U628ero/BZmOi8+daTEQehWm35a1i CA0A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=REb131pB; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-43046-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43046-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id b9-20020a05620a04e900b0078320788f94si7856060qkh.179.2024.01.29.09.20.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 09:20:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-43046-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=REb131pB; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-43046-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43046-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 908AB1C24EE1 for ; Mon, 29 Jan 2024 16:01:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8CDB0155A59; Mon, 29 Jan 2024 16:00:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="REb131pB" Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 736051552FE; Mon, 29 Jan 2024 16:00:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706544034; cv=none; b=jvhxvE4/b+KZXKOrEX6yPqaqJ2jLqwCAv9zlNVKHNU6iCp/F3XP+RHYroshp/Jhrhj0v7TglAYs/AH53h/5hM2R33EOkDSHDmNXFEJT156voO8oxYrMt272HG6pUfl40MtCBxIZxPR1L/ku20JGBVUx0Fcx+Qi2uJgZRVUVeQr4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706544034; c=relaxed/simple; bh=FX/3JZsgoeRJk8/gT/ahewzSdOBqCFPARvgcZJkGxSA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kaz7dDcoCCNdojhomeQBjIiyNtRlwFa6pl1T0y7/bc72YyBCdzJt2C6vgrFfgtSmaM2IJuNQMlQ3INtzbfHuvNaRiLY6Ybc2vbpfZStKHL1wsDEOCwxYfVnSUBewFRPv6xJ4QxJQyIb57H6MBZRpJK55dD7qjpchFhfXWFAiKxM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=REb131pB; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=pBVtJRmqf+crBbobrGzBK2lFMDtFqvFaWK9LtbdMiw0=; b=REb131pBQOlURPlaqY/BWYJkYn 6XiNQWL5ysnJDjT2Q/knsZymoxmJ9qg3ZTfjxAzf6s28tQ2qC1Ej9fGitEUS0C5NtE8hqJL7EnBxD C/JZrsLTBbNkc1ACH0HcmRUwZOBoMDQ2lO5CbUnkpj5e3WtB+EImTFJ71cHYj126vSqqUID5tbF1z pbQ5vbvK7Xy0+YFlr0gSMvXuWxBk9IpWXiUtwGPHQgFsV8nF2BPawr+OO5aM6hwKcaZFTE63IkmdY d2w1qigl2szKcAIB8iDyKjNn+GVTOJr78eGOyl+6Zny6+WsIjo3bFpaYg1BK6O65xAHu46yrE1pTR +ZBF5jNQ==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rUU3b-0000000DPH0-3JRj; Mon, 29 Jan 2024 16:00:23 +0000 Date: Mon, 29 Jan 2024 08:00:23 -0800 From: Luis Chamberlain To: Yoann Congal , Josh Triplett , Petr Mladek , Steven Rostedt , John Ogness , Sergey Senozhatsky Cc: 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 , =?iso-8859-1?Q?Andr=E9?= Almeida , Masahiro Yamada Subject: Re: [PATCH v2] printk: Remove redundant CONFIG_BASE_SMALL Message-ID: References: <20240127220026.1722399-1-yoann.congal@smile.fr> 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: <20240127220026.1722399-1-yoann.congal@smile.fr> Sender: Luis Chamberlain 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 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 => 8 KB, 17 => 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