Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp443896ybv; Wed, 5 Feb 2020 08:14:43 -0800 (PST) X-Google-Smtp-Source: APXvYqxtxNKcW3h7FyUv035CigUlvB2dYQAyol/9EVs33RYAgnOJV4HIqzug3C84rzcbRTI56v63 X-Received: by 2002:a9d:5a09:: with SMTP id v9mr23803036oth.214.1580919283429; Wed, 05 Feb 2020 08:14:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580919283; cv=none; d=google.com; s=arc-20160816; b=yLDlyT35oezUzJQvxYpeI92hXLbF/E4/SsChEDFZc7c5u9wgg7B6YnJS043RoDS6V7 eiH6T7we/WGgr93ikfcHFCUnxov0jinYcQ1cmBeyfBT8cqiE/t85ENFY+Uotygb6xIbs tLDU6vKkPJD01yAER6RjpgwceBEh1HwTdYu2YhL1cWgay9FeEwUP1EQL1KxKEpXlKL0z TvmHSHfhTbMHWF0xKq0ffR1wcVRbPn62EDb6BvPTVTDvcudm5cH0ajA9zEhCeEKxdKnV 16P8oA4PeBiDrWCXgs4MsV7sChmRoJ5eQVcu5zQ15RaBkH06PKg6lkbzxbeUOW5XRHmW QPKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from; bh=2MW1kuxYNThff96CCpFtfoMY786LzhJplENc5hW4AOc=; b=Y6xeWJYHTDA8KN5qJsDS+OxY85jNKMOudHVjsQuRuTz7b1vL/3RBKzqt+4llAJ8KCd yBqqwM9kJH7Ss2hX8lu8zoNr4GSTK1D7800Ju9BwfR8U09jYy+lB1G54tkkePEhi+kKI OYqZLNRCMUssquIY6zkOczeZDiMiCShC6nEoZCjo8ZPsmzoBDn/vlbht3GmPvvjpazlB Y8uu9CmNRUuN54pC/QY2VpSnwv69hDFOGc4yS5nGA/+8/v72iotCnJ9Q3A6l8C2pMGMV zBZY++5krjzVaaNb0an/MnQdLLl1HVn9QoXPhOrukn7qy6wZlujWLNN1eyS1R40MTl27 42fQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v7si251903oic.208.2020.02.05.08.14.30; Wed, 05 Feb 2020 08:14:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727178AbgBEQMS (ORCPT + 99 others); Wed, 5 Feb 2020 11:12:18 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:35917 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726973AbgBEQMS (ORCPT ); Wed, 5 Feb 2020 11:12:18 -0500 Received: from localhost ([127.0.0.1] helo=vostro.local) by Galois.linutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1izNHi-00052E-DZ; Wed, 05 Feb 2020 17:12:14 +0100 From: John Ogness To: lijiang Cc: Sergey Senozhatsky , Petr Mladek , Peter Zijlstra , Sergey Senozhatsky , Steven Rostedt , Linus Torvalds , Greg Kroah-Hartman , Andrea Parri , Thomas Gleixner , kexec@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/2] printk: replace ringbuffer References: <20200128161948.8524-1-john.ogness@linutronix.de> <20200205044848.GH41358@google.com> <20200205050204.GI41358@google.com> <88827ae2-7af5-347b-29fb-cffb94350f8f@redhat.com> <20200205063640.GJ41358@google.com> <877e11h0ir.fsf@linutronix.de> Date: Wed, 05 Feb 2020 17:12:12 +0100 In-Reply-To: (lijiang@redhat.com's message of "Wed, 5 Feb 2020 18:19:02 +0800") Message-ID: <87sgjp9foj.fsf@linutronix.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-02-05, lijiang wrote: > Do you have any suggestions about the size of CONFIG_LOG_* and > CONFIG_PRINTK_* options by default? The new printk implementation consumes more than double the memory that the current printk implementation requires. This is because dictionaries and meta-data are now stored separately. If the old defaults (LOG_BUF_SHIFT=17 LOG_CPU_MAX_BUF_SHIFT=12) were chosen because they are maximally acceptable defaults, then the defaults should be reduced by 1 so that the final size is "similar" to the current implementation. If instead the defaults are left as-is, a machine with less than 64 CPUs will reserve 336KiB for printk information (128KiB text, 128KiB dictionary, 80KiB meta-data). It might also be desirable to reduce the dictionary size (maybe 1/4 the size of text?). However, since the new printk implementation allows for non-intrusive dictionaries, we might see their usage increase and start to be as large as the messages themselves. John Ogness