Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2635744rdb; Mon, 12 Feb 2024 11:01:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IG5yRq0kvSyq3w1RqBs+JYYgCRCglfxdyAn2sW25DbbxPMnmoGBuj3AWPnWD7dPheR41eYU X-Received: by 2002:a05:620a:440b:b0:786:647f:26b0 with SMTP id v11-20020a05620a440b00b00786647f26b0mr2229609qkp.55.1707764509425; Mon, 12 Feb 2024 11:01:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707764509; cv=pass; d=google.com; s=arc-20160816; b=wnB45p7lrKVIrlvzmaacL5XJtgkd1tbxXZ6Y9x6GzK3NOciTZwrW/bd4EHK4blMfsF xq6rVUrSphQeUsNSk7Z4SGW+ZWFvsL2UTvPqzltAVfpPTZ5LgsJ5RuQb/Kx3UJsNU4wa 5lP7PocRcU4O1E/YZJRcPtwFCTb8N3OengkzZPkm+3n2sf4fxBCuE1bD+N4eZi3touda 24BTU6X+P1NaoGXp7eeG/97SbnwjbL2iQBXFtbyZ/M8eCeUb/X8ZzTEBgXhrfZoccY3V H/tpMVJCysu6UiveVCUpGlmNdhp/4n1lfBaQA2NbYpH8wHMVeNQg5ZVafo7whB2AFSHA HHJA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=nTN7g1IyMMydmi8H/FiAGDnVrKDKkYuRfKBBFCRX2Pg=; fh=EGFNzyT3oluBuOQszTWloRdy9MMkp2GYWKSeSUZdR50=; b=v/z2IBPEG4+EU51BUGhO3cvO+b+PQA/rVeB8da1Nf3yTSJq53B9N/1H244Vrqo+/jp ha/y2AhKclA+QdBK6xSksmzNe6ImMSflnkwFr4xSY4RJZfnt6FjGNCivJADBDa+IFRrs v6I0pLfr4n3bLbxuY8OjT0xgOMfqeaIuAIxjbD58Ua5QA2rCg0HmvoEtIkchMLb5jZND N1HxXgAFEc2Ea8FLXa3wdu9dCr8QS5Hq46zHNE74XHaw8F2+5Z172+ruzseFS307Buc+ 1Kw9IXoNbd+OyYgRbyvOfuNYC4bJkzZL3fcSzyhnV+u7dqDjMFU/1/tPrs21pIWy/FQt 0m3Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@smile-fr.20230601.gappssmtp.com header.s=20230601 header.b=H6xDxukL; arc=pass (i=1 spf=pass spfdomain=smile.fr dkim=pass dkdomain=smile-fr.20230601.gappssmtp.com dmarc=pass fromdomain=smile.fr); spf=pass (google.com: domain of linux-kernel+bounces-62249-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62249-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=smile.fr X-Forwarded-Encrypted: i=2; AJvYcCVzEJLJkSNxNmTzRtZjXsy6twCkWxJq19vOvHgYDCEGXVphoSBz6Ui2cb9d9Y98y2gILxle1pKcMGUO3XlSmuEiSr72ncc2AAUH7fo4gA== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id az44-20020a05620a172c00b00785da900320si1816380qkb.78.2024.02.12.11.01.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 11:01:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-62249-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=@smile-fr.20230601.gappssmtp.com header.s=20230601 header.b=H6xDxukL; arc=pass (i=1 spf=pass spfdomain=smile.fr dkim=pass dkdomain=smile-fr.20230601.gappssmtp.com dmarc=pass fromdomain=smile.fr); spf=pass (google.com: domain of linux-kernel+bounces-62249-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62249-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=smile.fr 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 243701C214CC for ; Mon, 12 Feb 2024 19:01:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6EBA246448; Mon, 12 Feb 2024 19:01:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=smile-fr.20230601.gappssmtp.com header.i=@smile-fr.20230601.gappssmtp.com header.b="H6xDxukL" Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B49A64177B for ; Mon, 12 Feb 2024 19:01:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707764487; cv=none; b=aImPo8n0uzV7aRRL1Wd5Q3xir/K8lmeBPXDdPddLZdnDHO3D/P3XuQcogD+NVDhbGQc5279nQijNRcsUAlTl+pZ5lzL7XZ0v4gC5dFluMzW3OdEC4LOvKiZddiyQJmRSLq2uOzr8XliM8xfUm6xd6DU8h987lV4Y6LN6enuv7YM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707764487; c=relaxed/simple; bh=fcnOy+w9ogefgfFNDH/dzHcMlY+8Q6Sf6kVS+I216TQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=FmEFbxj36H3+w3/xScsBcKfKpz3suxApsqeKv3InFESNniBcLqcVzHkQP2X6HI1sKmo4J17eR1igEgu6+N9GFhtWGjOzHWK7wP4L289ip8M2lxHJmF/6zpkEuZxwmDTWZTG/MosyLBcR/H8V05ivsFeLbYcOf37X69mOBmw6YZk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=smile.fr; spf=pass smtp.mailfrom=smile.fr; dkim=pass (2048-bit key) header.d=smile-fr.20230601.gappssmtp.com header.i=@smile-fr.20230601.gappssmtp.com header.b=H6xDxukL; arc=none smtp.client-ip=209.85.221.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=smile.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=smile.fr Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-33aea66a31cso2031536f8f.1 for ; Mon, 12 Feb 2024 11:01:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile-fr.20230601.gappssmtp.com; s=20230601; t=1707764483; x=1708369283; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=nTN7g1IyMMydmi8H/FiAGDnVrKDKkYuRfKBBFCRX2Pg=; b=H6xDxukLzAIwPOlTOcIkiYzo5iYY7WfNnHrmR/yr3AKr+u4l5WuhacWJ52ubl5pyfk CkBluJIoZw2FMsBkevs8UEAVGOwv3zdbj80tDQYfMWPLRgBjxXteVjcIVplUaIWNeiad WDwV6pKRqWl9rrreZokhc1YlsrQ7cSBPbO82KJE+TBNLFZNnaJAHUGPOWva3veccHz9L IL3NHANGQEQoEz6sNlJ7dKThkYIA6rZyZ1OlT7rE3nW6ewD0V2147mw5WE2iFS4sLzoi 497xqTNAz6gnLNMzmbZWRX06/HwShkQ7RHYzDb6Y1iuIVa95kbnWT7cWSN5i29AVZKH3 KtUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707764483; x=1708369283; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=nTN7g1IyMMydmi8H/FiAGDnVrKDKkYuRfKBBFCRX2Pg=; b=Fo29hEMP4bWm7qXZgnoDprzqhuO4uGoPNvTWeF0Tw1fqoV3AUkn2/h1xkdzWm52SUN vE5COa7VeqLSW0v54m8ldoIh3lScMGLU2SxsjShgmITNzmfB3Tm8fzpKmhxb4gZuCqVD gRw3jD7I+IFUamHy0q5fjQv2NVDFcu0i3a/gQmsh7nJLlwAywe8F8XBMVSgrkpr0/MyG oeyw6Eax9wF9BvWI4z8LkQNf5YGp+AmjY2FffnSp9JELWuj4onHZaaGDrPaa0n1CFAKf klWI1hNnK6DT3hxSiWzdqxJDCZqXSYWoG91IteMD3cA2FtKxQUIWQbXWfJSmOe14iE3s uLZQ== X-Gm-Message-State: AOJu0Yx39IjZsDGM7iGK0ow/Zhs++gYwmfDRh34Pm5Q47SLV2ettOMqM Cv3tVu89OlZa+H4nSMUXArnn4NmeAceg8FqKXGIptMteeKRjjZljpuIOpECiUcE= X-Received: by 2002:a5d:6150:0:b0:33b:8678:aac with SMTP id y16-20020a5d6150000000b0033b86780aacmr1654581wrt.0.1707764482762; Mon, 12 Feb 2024 11:01:22 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUeZ+7BVRcbP5p2DXANZc825w5QGn23J2RI8Q1sBzceuN+l+JOIjgxysBA+O7jE0tdlt3wG/+YfIXGPFKIvpGyL/LQMbzo8GG5VfFwJpuJiTd8zpyF4jlVbw++Kt1wupyUmD8vqQLdz/j4V+IuRnYFevrTzJIRxrMChSvRTzYrLTZKag8Qq2Da1C5CCdCEuUXOsRcJNf4ND1gzeB2wBTbRtUk+vbTjf7+PWQTj0diX11BPqwxx7xFSfMSPkUqEDikDTVlVuaopYsRxm2HB0yiBU6tTEd/FLw6zkiijzbcvo/yr15IP4AOoKLe/3Nk4wY41jhI1QDohtNL8dlnsdpe/pRkVvkuuwRhfZCQ7cLMs8MAlb1YxioofSDosmrNJqnSz27Q1djUqCO1EHPAAXG7xnMcs8apTMHM3PCvi7UcCQHPK8V46iePw1tCqtZ6Z7vzNM0oZ9f6NuQ+ATlXLDWpNrRagh77RlS9ioJ5+rzR7XLpAwnNqgReoMeWpxBZDyDCE+I2mZ6VLz66+X4lrEqj4PlOCt26MVB3FYze49wxP/iLNPh+QFMSZCxaspQtHs4tzmLxjziw6b1nouQGIQNNhhl+lq+cKo74+IwRL/x30i5ENfy6qg2JGAk1jZLXQ/Koel1bT3WhD2r1ooqS3i4rZ9he7ADvfCucJeMLcc8LqsdXKMmSYnt6usE5cbDsWxRO6BXa2tctlS+Y91eKMsMxk+baJ5ennsIRVMIA9IFwX1gJiwt3EzVHWNmCCqzAkp3JOo/UTBoeyFzr3d2J6CVe65c4T7vEOEF9k3ow== Received: from [192.168.0.20] ([89.159.1.53]) by smtp.gmail.com with ESMTPSA id ay20-20020a5d6f14000000b0033b495b1d10sm7719037wrb.8.2024.02.12.11.01.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 Feb 2024 11:01:22 -0800 (PST) Message-ID: Date: Mon, 12 Feb 2024 20:01:21 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 1/3] printk: Fix LOG_CPU_MAX_BUF_SHIFT when BASE_SMALL is enabled Content-Language: en-US To: Masahiro Yamada Cc: linux-fsdevel@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, x86@kernel.org, =?UTF-8?Q?Andr=C3=A9_Almeida?= , Borislav Petkov , Darren Hart , Dave Hansen , Davidlohr Bueso , Geert Uytterhoeven , Greg Kroah-Hartman , "H . Peter Anvin" , Ingo Molnar , Jiri Slaby , John Ogness , Josh Triplett , Matthew Wilcox , Peter Zijlstra , Petr Mladek , Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , Willem de Bruijn , Vegard Nossum References: <20240207171020.41036-1-yoann.congal@smile.fr> <20240207171020.41036-2-yoann.congal@smile.fr> From: Yoann Congal Organization: Smile ECS In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Le 11/02/2024 à 00:41, Masahiro Yamada a écrit : > On Thu, Feb 8, 2024 at 2:10 AM Yoann Congal wrote: >> >> LOG_CPU_MAX_BUF_SHIFT default value depends on BASE_SMALL: >> config LOG_CPU_MAX_BUF_SHIFT >> default 12 if !BASE_SMALL >> default 0 if BASE_SMALL >> But, BASE_SMALL is a config of type int and "!BASE_SMALL" is always >> evaluated to true whatever is the value of BASE_SMALL. >> >> This patch fixes this by using the correct conditional operator for int >> type : BASE_SMALL != 0. >> >> Note: This changes CONFIG_LOG_CPU_MAX_BUF_SHIFT=12 to >> CONFIG_LOG_CPU_MAX_BUF_SHIFT=0 for BASE_SMALL defconfigs, but that will >> not be a big impact due to this code in kernel/printk/printk.c: >> /* by default this will only continue through for large > 64 CPUs */ >> if (cpu_extra <= __LOG_BUF_LEN / 2) >> return; >> Systems using CONFIG_BASE_SMALL and having 64+ CPUs should be quite >> rare. >> >> John Ogness (printk reviewer) wrote: >>> For printk this will mean that BASE_SMALL systems were probably >>> previously allocating/using the dynamic ringbuffer and now they will >>> just continue to use the static ringbuffer. Which is fine and saves >>> memory (as it should). >> >> Petr Mladek (printk maintainer) wrote: >>> More precisely, it allocated the buffer dynamically when the sum >>> of per-CPU-extra space exceeded half of the default static ring >>> buffer. This happened for systems with more than 64 CPUs with >>> the default config values. >> >> Signed-off-by: Yoann Congal >> Reported-by: Geert Uytterhoeven >> Closes: https://lore.kernel.org/all/CAMuHMdWm6u1wX7efZQf=2XUAHascps76YQac6rdnQGhc8nop_Q@mail.gmail.com/ >> Reported-by: Vegard Nossum >> Closes: https://lore.kernel.org/all/f6856be8-54b7-0fa0-1d17-39632bf29ada@oracle.com/ >> Fixes: 4e244c10eab3 ("kconfig: remove unneeded symbol_empty variable") >> > > > > All the Reviewed-by tags are dropped every time, annoyingly. Hi! Was I supposed to gather these tags from patch version N to patch version N+1? In that case, I'm sorry, I did not know that :-/ Patch 1/3 is exactly the same but patch 2/3 is equivalent but different. Is there a rule written somewhere about when carrying the tags across revision and when not? (I could not find it) > This is equivalent to v4, which had these tags: > > Reviewed-by: Petr Mladek > Reviewed-by: Masahiro Yamada Thanks a lot! > >> --- >> v3->v4: >> * Fix BASE_SMALL usage instead of switching to BASE_FULL because >> BASE_FULL will be removed in the next patches of this series. >> --- >> init/Kconfig | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/init/Kconfig b/init/Kconfig >> index deda3d14135bb..d50ebd2a2ce42 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 0 if BASE_SMALL != 0 >> + default 12 >> depends on PRINTK >> help >> This option allows to increase the default ring buffer size >> -- >> 2.39.2 >> >> > > > -- > Best Regards > Masahiro Yamada -- Yoann Congal Smile ECS - Tech Expert