Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1375900ybv; Thu, 6 Feb 2020 03:04:01 -0800 (PST) X-Google-Smtp-Source: APXvYqzaa3WTUOEvZMA7AuNH9Soa8RwgV18ew79I19liAseR86XSGzJ5Seh9ywmWP2E/8UQkI+8g X-Received: by 2002:a9d:d0b:: with SMTP id 11mr31020047oti.287.1580987040908; Thu, 06 Feb 2020 03:04:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580987040; cv=none; d=google.com; s=arc-20160816; b=HBP9fZb2lbajLH3xWT2Wr4AFuqF5YHvKrdWlXTFZYfMpcgCzNaAN/oWjNXm1buwt91 FCXVMmDgo0fM3mxmLN+YrWAWYdjGO/M+zFkPCP2zAjbp2KKlYEsCNPvOB82s6r1hWjEh MGGmcIDzSj7NA5H6FyHvUeuvCxSNPc28VHStH5++n4jHFch/Av5z8ug0lqxPcmMV4bAo Bc2t8bhK/L1/zq0Hshb+J8qy0Sx9xSqaveKoeMmCVyW9UGXmaRrNOj5KMCdl3msfRh6S VUwGa1OwsoGrdmpTqt/u/hX2TYjVyCHimSuMGKc64ACEj6cRbN0h7fcxEXjFJ722tJ70 Y0WQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=BUh0i0ZHsQ/jsDj5YBvsMi9/L1YBCsjN7m5EaFUvBaI=; b=ZOKELr2CAD3W2TushCz70LWSzoLu+N6zaWe1svFNLsseLVt2sRO1sbM7P6os1g/kmd bwGu9rzeNoEjM+ZuNKztuT7JqSII8LnW7/9/vdM6abgfiMuiu/RdmEQrl5C9SghU/kXM xx1034z9hySVyGRRyn2x0rGGQbX8pqnG/6XM648cGRaDyc4aJmTuoXhEN9XmRZ0nAD7b mtI/HCYkbl4Usc7uvv9GNiJDAZ4c1FFVf7HM2arp5pgnGvoRd6LrVbHRFI8nkcxx6S4+ 5v/PziESdJph7zjz4ndSIsDLTs8MTxBcCGyLip4fStOUcLY64pZgt0kS4Kq2OekKPFK8 OAnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=en4NwJSK; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q25si1741767otg.128.2020.02.06.03.03.48; Thu, 06 Feb 2020 03:04:00 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=en4NwJSK; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728342AbgBFJMa (ORCPT + 99 others); Thu, 6 Feb 2020 04:12:30 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:41012 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728325AbgBFJM2 (ORCPT ); Thu, 6 Feb 2020 04:12:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580980347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BUh0i0ZHsQ/jsDj5YBvsMi9/L1YBCsjN7m5EaFUvBaI=; b=en4NwJSKB3nOkorZ0pwYAflgRNlNOevmEKR4jtwN88Z1nlsK533wDQyIAMKQUCuJvLsamM bUq2BLrzQQ5kOZubKlwkNEgcG/Sr3EVGQw6zZ/wROSXLOoZnZK7DpaPYwJ7RXKTl2Ms8XR mxKZUK3onaM5Ryr/v/p9UzDqs8s/oF0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-395-0GWQdRIOOyejgzXG6QsyEQ-1; Thu, 06 Feb 2020 04:12:25 -0500 X-MC-Unique: 0GWQdRIOOyejgzXG6QsyEQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A8FE4DB2D; Thu, 6 Feb 2020 09:12:23 +0000 (UTC) Received: from localhost.localdomain (ovpn-12-108.pek2.redhat.com [10.72.12.108]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7617660C05; Thu, 6 Feb 2020 09:12:18 +0000 (UTC) Subject: Re: [PATCH 0/2] printk: replace ringbuffer To: John Ogness 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 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> From: lijiang Message-ID: <990f0076-7df2-c956-6181-fd222c1023f6@redhat.com> Date: Thu, 6 Feb 2020 17:12:14 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <87sgjp9foj.fsf@linutronix.de> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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 > Thanks for the explanation in detail. Lianbo