Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp270147pxa; Tue, 11 Aug 2020 02:30:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxsBiXQ7/kal5tuhidU/wng72qEph4+OG41kGsbzh3G356ITmmy0Mi6+zQXH0E2myupWYs X-Received: by 2002:a17:906:f847:: with SMTP id ks7mr26845318ejb.402.1597138239524; Tue, 11 Aug 2020 02:30:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597138239; cv=none; d=google.com; s=arc-20160816; b=CNfeLzLh/znOTPOs6/3hPWmT1B7wbtJENr72THTUHhmWtD3tZ2xKi1W0fzpeU3J5Jf Wb1EOwgH3F0UmHGF5qqkxxWC5oM02r4p5kKsW4jl5vVSSC9VH5jMQS83j/oI9BhB/YFV LpxIXaKahyizbpIwBwG8c4yIsuXjhvjK6iF6MIdHpVhRxyKYOx1jEzRvjQSW0puO+kaA eJb2964dvgmEa86rgeKGrsia/Dh2DaoYzAC6o+s0eriJbncazI8kxf2/I9IM8zArcm6Y 1LPGel3On0FJ6MTNlYPEnOuDGJ4XbR5ZBBgf0VTFxmBf3JlS1XVBbG91Q3bxepeY3A1F RC9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=0Oj0mPpW0t+hkknTQJV7lhfGaTvYdNWvEfwcjrGji+M=; b=UVFZiHgh76qs56gefVOY9rtD++b7yp60aI9gNPXz1u0PZ8EVCqbc8sOk+ylzZzz90h DgKD8oQY1k3em9QoNvzuEms5TcrWyFNzQbkt9LHrGa+d8nig0ZePuQXkmFL7EbupN/S7 n3VXrkVEC9Qpakuf9sHHc57juMWcbITWcXWjee9bN5xoS9tE6tOnvMx0Pj75JeMF0tm3 +CLyPJFt599EA47q1pfS56xudvLbIoLk9BTgovuxkX9uVFczuhdIGNgi71hG1bi9LGDx 3vXEqpuvs7hcG3IuAtx9nDKyO8zssrMk3e/xPyrlA/OiZOT05JbSR7JkBWEb3kWq2gAB QFEA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pg13si12562594ejb.681.2020.08.11.02.30.15; Tue, 11 Aug 2020 02:30:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728419AbgHKJ3b (ORCPT + 99 others); Tue, 11 Aug 2020 05:29:31 -0400 Received: from mx3.molgen.mpg.de ([141.14.17.11]:38383 "EHLO mx1.molgen.mpg.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728224AbgHKJ3b (ORCPT ); Tue, 11 Aug 2020 05:29:31 -0400 Received: from ersatz.molgen.mpg.de (g45.guest.molgen.mpg.de [141.14.220.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id 5470E206462B4; Tue, 11 Aug 2020 11:29:29 +0200 (CEST) From: Paul Menzel To: Petr Mladek , Sergey Senozhatsky Cc: Paul Menzel , "Luis R . Rodriguez" , linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] init/Kconfig: Fix CPU number in LOG_CPU_MAX_BUF_SHIFT description Date: Tue, 11 Aug 2020 11:29:23 +0200 Message-Id: <20200811092924.6256-1-pmenzel@molgen.mpg.de> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently, LOG_BUF_SHIFT defaults to 17, which is 2 ^ 17 bytes = 128 KB, and LOG_CPU_MAX_BUF_SHIFT defaults to 12, which is 2 ^ 12 bytes = 4 KB. Half of 128 KB is 64 KB, so more than 16 CPUs are required for the value to be used, as then the sum of contributions is greater than 64 KB for the first time. My guess is, that the description was written with the configuration values used in the SUSE in mind. Fixes: 23b2899f7f ("printk: allow increasing the ring buffer depending on the number of CPUs") Cc: Luis R. Rodriguez Cc: linux-kernel@vger.kernel.org Reviewed-by: Petr Mladek Signed-off-by: Paul Menzel --- v2: Add Reviewed-by tag init/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/Kconfig b/init/Kconfig index d6a0b31b13dc..9dc607e3806f 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -718,7 +718,7 @@ config LOG_CPU_MAX_BUF_SHIFT with more CPUs. Therefore this value is used only when the sum of contributions is greater than the half of the default kernel ring buffer as defined by LOG_BUF_SHIFT. The default values are set - so that more than 64 CPUs are needed to trigger the allocation. + so that more than 16 CPUs are needed to trigger the allocation. Also this option is ignored when "log_buf_len" kernel parameter is used as it forces an exact (power of two) size of the ring buffer. -- 2.28.0