Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp212354pxa; Tue, 11 Aug 2020 00:32:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmls/CRqDvWMP4pj0FJzUGv5VyeIPSk2r+ZB8pI4OmAbyHI0QfbXHQg2HpKraM3CHwgLTT X-Received: by 2002:a05:6402:7d5:: with SMTP id u21mr24513788edy.235.1597131178462; Tue, 11 Aug 2020 00:32:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597131178; cv=none; d=google.com; s=arc-20160816; b=Obsu5nnLbqZrw6GeOctqwZVP4Haix9LUXyYfVGbfSB+pPTfd+2lHG/LIAgg2DBYzTd zyiAWLIAPzDpDBXwiiNWwvN1e57jbNk/z8/Hez5CF3+3Hy/KiJBvGn1lqOgyP8vSqEJu kbJeUbcQnUevbsvhiOjd4nwNYHnZuzHVHL/heekXZ6Y42h6IGuB20wujCxYO/xw+OfGl 0galrLPuIJcSlRTgrxf2uxMCIHLR8wYWHH49h1ZCmX4MAm7SxKXPweZe3t2DRqk9UUAc 2bkx1YOK9ZAYXiIn+R2D7DK3AVJuzTIFeCmo34zAkdbbb6y6lla2eIxPgeLug9MFRe8z MJGg== 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=JpbgfOlfxBahcbm3KtOr86o4vT2fms0WhwDayA+PeUY=; b=FLV4lC7XuzD55a1EaaI+8XEWBuEl7FzwYCKJj1yGSQB0kQdFTh8syoD73MpYSUfoKI XIN9X45hmKmQYG9oq1tIb1i0vMjU9egmmMxcm738dYhNHI7CIw5B+7iLNWBQhTOGkxEV AqzPE6cn5LUDLd0zf+5xFiOzWcU3aDzKhlWfbOdYECB3Re1scorjiUPT8nJDM7WHkzwK 9lE685GXsGkEjrp+7nhaWC0qfiLPgNgWHhE0Xw+3gCf463AlsP9aGTmFzqmCEJsA8693 B2KeYw/bkaya4Ou/evxXMOckvQ9hMfukgU8GhXPIS9JJRwzCWD0exei7Yh8jG4G4w12O 3KQw== 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 i11si11498441edx.429.2020.08.11.00.32.35; Tue, 11 Aug 2020 00:32:58 -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 S1728160AbgHKHb5 (ORCPT + 99 others); Tue, 11 Aug 2020 03:31:57 -0400 Received: from mx3.molgen.mpg.de ([141.14.17.11]:55969 "EHLO mx1.molgen.mpg.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728129AbgHKHb5 (ORCPT ); Tue, 11 Aug 2020 03:31:57 -0400 Received: from localhost.localdomain (ip5f5af129.dynamic.kabel-deutschland.de [95.90.241.41]) (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 5AE95206462B4; Tue, 11 Aug 2020 09:31:54 +0200 (CEST) From: Paul Menzel To: Petr Mladek , Sergey Senozhatsky Cc: Paul Menzel , "Luis R . Rodriguez" , linux-kernel@vger.kernel.org Subject: [PATCH] init/Kconfig: Fix CPU number in LOG_CPU_MAX_BUF_SHIFT description Date: Tue, 11 Aug 2020 09:31:45 +0200 Message-Id: <20200811073145.3457-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. Cc: Luis R. Rodriguez Cc: linux-kernel@vger.kernel.org Fixes: 23b2899f7f ("printk: allow increasing the ring buffer depending on the number of CPUs") Signed-off-by: Paul Menzel --- 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