Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp529720ybv; Thu, 13 Feb 2020 05:09:08 -0800 (PST) X-Google-Smtp-Source: APXvYqyKvDbAfl95zK0Og76a3w9ljh5KEbUmRQMubpwXNr/kH3SNzMElvkwoD3Xf6jIRaFRz63tQ X-Received: by 2002:a05:6830:22cc:: with SMTP id q12mr13724704otc.110.1581599348459; Thu, 13 Feb 2020 05:09:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581599348; cv=none; d=google.com; s=arc-20160816; b=llOeUD9Uzb3L1Z5/qCUgFDsLH1pUSVa/X6oMTCom96HIpppIpaD5iXErPeCPmxqNJB lBpf+xpcZx7yWdlc8voxJYqO7j8YdRUdAgKMoJXLSaal73+TffpeGDqaBbSAQRL9JEBs e5jLXHtuCsmw/SAPnyCMrLGSS4IGl4FF7NeBf9ho0pqp2vYqZvJZwGM+DWrqYiHSQQIf JtDiD04LocSXO/iesS0atXnEUih9PUzQdZ5DGzvJ30r688WKa/Uqcih5ngeaRO4TKIFR rLS2Ez4XcQQ9vdsoesAgjUOj5PdObvL/5X5v/ux4NyMQz+BHrrR3uOQhsp5T/c75UI3+ Lg0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=AXzWGN5h1lXLTVNuKRguMGdgIeRb4CWmw4ALcHlr5M8=; b=jlj8WfJEEQrTag22y3e6iLaBd75pXMFOFOC7UH4iXRES90qhAQpOLCygrDDYOLrFaq uDLm24hsp3RdPMVGanJ0iU8j8JkosDHdyAjl2O0swrUnkktVwtLyrL6S4jAutSId49pK vTur1p0URds2No8ploGJgbb5afskzQ/49Z7tJ9f/6YLNachGCIvKmp+QNu3WbLnrAGuW ClxgGV5UJ+/GRJZqrDg7QQWlm0p5OWSG0lAh3GypKj7kh4dxjfz32ytb/7t2LUCJBq12 pYkLK7JG8P00HmsWNM/dwXmEn4kvKdsCyyTjXFr9teNMUYIy8RwjlAFa5O7+BzXr3tcS kglw== 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 a205si1167558oif.159.2020.02.13.05.08.55; Thu, 13 Feb 2020 05:09:08 -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 S1729963AbgBMNHY (ORCPT + 99 others); Thu, 13 Feb 2020 08:07:24 -0500 Received: from mx2.suse.de ([195.135.220.15]:41110 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729572AbgBMNHX (ORCPT ); Thu, 13 Feb 2020 08:07:23 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id B13ECACD9; Thu, 13 Feb 2020 13:07:21 +0000 (UTC) Date: Thu, 13 Feb 2020 14:07:20 +0100 From: Petr Mladek To: John Ogness Cc: lijiang , Sergey Senozhatsky , 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 Message-ID: <20200213130720.j4e5qv37am2bapup@pathway.suse.cz> 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> <87sgjp9foj.fsf@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87sgjp9foj.fsf@linutronix.de> User-Agent: NeoMutt/20170912 (1.9.0) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 2020-02-05 17:12:12, John Ogness wrote: > 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?). Good questions. It would be great to check the usage on some real systems. In each case, we should inform users when messages and/or dictionaries were lost. Also it would be great to have a way (function) that would show how big parts of the two ring buffers are occupied by valid data. It might be useful also to detect problems with the ring buffer: + too many space reserved but not commited + too many records invalidated because of different ordering in desc ring and data ring. > 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. I wish the dictionaries were never added ;-) They complicate the code and nobody knows how many people actually use the information. Best Regards, Petr