Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp81310pxu; Wed, 14 Oct 2020 21:01:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxO3uFkaxz/6yWxJz6JkhjmQy6H1d1LKFXVoSuXwNG26VgyJR9OKkcVpWn039RxRLQKS7gr X-Received: by 2002:a05:6402:602:: with SMTP id n2mr2296274edv.327.1602734498072; Wed, 14 Oct 2020 21:01:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602734498; cv=none; d=google.com; s=arc-20160816; b=UJCA7o26UGXNQlRczHKztgXb1SKeNF7LY+QjNRoZlAuwJrAn19wRIlNw+msHg+cCgT WF37/jcvw4uq/ZQIiubwNA4CSOYCvVRFSI5xO1DAdV6oVYNXxZC1KS0q5wYufdrNMheJ lLSo+j2s5Uzulz8KIqSArCwwodIwBnEFLcbeNj+sbRbSdcWA8j1U9trS9TOc30yiKIhi iAHswHhjwTpMwgudtufslqlEdVX6FWzpiswU78zyzXVpSSyvrJb7Umkyb21hHzH22UBn pMdHeVY97Of5Phd/sZioizRnqzxyEmt3fqKBjWEqrgwMgS6FsXBn2MjuDq7zg253rWBL MATw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=pjGI6H9agriY8l5DUZ66fy7If4bjx92jpFy4Tji1P+Q=; b=Vo26kOB7NGv3MbGCngKhANNuz8/IJ+B3tyOMPrHMNkBuNcWq7yF0Y+ewdx6kwrnCew wCSYCi8xk4GSPer2kxfMSGfh7bVXsgkmjSDOJPLJctwM4+8iReK3MDhznnjG5pF0khq0 R+3f7/nuxQmEdpkI1ZrIWKyhZLsi/eB34ErjAZ1RPqlcaA9EB6gzhn21xrassmw8oqTL gmsBKca5LN94o2LrHR+7ED/0/7j2kOc5Jt28gwSB/OABl9GY0vaV17rp0LZ7SFix53AI yfTH6N9eC5OVnjP8QBv54i24QzDwGYdPFxcj4HJYSKTRJ4v8E1S4hWp22hpUslTr5OlA 5s7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=lUIm7QuZ; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d19si1149902edp.276.2020.10.14.21.01.15; Wed, 14 Oct 2020 21:01:38 -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; dkim=pass header.i=@linutronix.de header.s=2020 header.b=lUIm7QuZ; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729651AbgJOBoi (ORCPT + 99 others); Wed, 14 Oct 2020 21:44:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729403AbgJOBoi (ORCPT ); Wed, 14 Oct 2020 21:44:38 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2CAEC0613D4 for ; Wed, 14 Oct 2020 13:55:32 -0700 (PDT) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1602708931; 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: in-reply-to:in-reply-to:references:references; bh=pjGI6H9agriY8l5DUZ66fy7If4bjx92jpFy4Tji1P+Q=; b=lUIm7QuZ8vsupAyZT7jr3RthxXVf/R/A651aPEYTr4ijryfyHCNyb4+4+rIB957Tgny3bT waB6BPwqhvHkFP3rJuj8OqGsYrt4coa6Gkutq76fTPTJyQnlVpu1HkkUt5PdxB8pwelxar 9mz7P7YY+dA7EBi/FmqA/NHnfgpyrIoOi4QrqJsSQpTZm6iyKAUGW65zqA1kuIUZ+jUmZu 9frbOdAshP7nLAv1IXXs3jEPw4KmBMZCWzs9ezHZ9rURkqenmXxYnjL1FuqZYXq5ccAjgd 7AN+34YKCOhGd6tOEBwU+neaygffAYF8YJt+jZ1u4bgYDapoOqEwqM7xlLzawg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1602708931; 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: in-reply-to:in-reply-to:references:references; bh=pjGI6H9agriY8l5DUZ66fy7If4bjx92jpFy4Tji1P+Q=; b=IvH1opAJBTH7APHNqHnZVuXCHqZqLBQUcoUpxy+8vK5QJQUZ5R9Jb0nl+TA5psm9M/LQuO 5q1BGHK0SOwiVDBg== To: Geert Uytterhoeven , Petr Mladek Cc: Linus Torvalds , Sergey Senozhatsky , Steven Rostedt , Andy Shevchenko , Rasmus Villemoes , Peter Zijlstra , Linux Kernel Mailing List , Daniel Thompson Subject: Re: [GIT PULL] printk for 5.10 (includes lockless ringbuffer) In-Reply-To: References: <20201012144916.GB10602@alley> Date: Wed, 14 Oct 2020 23:01:30 +0206 Message-ID: <87lfg85xz1.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-10-14, Geert Uytterhoeven wrote: >> - Fully lockless ringbuffer implementation, including the support for >> continuous lines. It will allow to store and read messages in any >> situation wihtout the risk of deadlocks and without the need >> of temporary per-CPU buffers. > > linux-m68k-atari_defconfig$ bloat-o-meter vmlinux.old vmlinux.lockless_ringbuffer > add/remove: 39/16 grow/shrink: 9/15 up/down: 214075/-4362 (209713) > Function old new delta > _printk_rb_static_infos - 180224 +180224 > _printk_rb_static_descs - 24576 +24576 131072 of _printk_rb_static_infos is reserved for dictionary usage. The rest (49152) is for the record meta data. Previously any dictionary usage and record meta data was embedded in the message buffer (log_buf, 65536). Since the meta data is now separate, setting CONFIG_LOG_BUF_SHIFT=15 would provide roughly the same amount of record storage as CONFIG_LOG_BUF_SHIFT=16 did with vmlinux.old. Then there would be: 32768: message buffer 24576: meta data 65536: dictionary data 12288: descriptor data Excluding the dictionary data, the total is 65536. (With vmlinux.old there is 65536 total with CONFIG_LOG_BUF_SHIFT=16.) It is the reserved dictionary data that is hurting us here. Should we provide a config option to kill the dictionary data? Should CONFIG_LOG_BUF_SHIFT do an implicit -1 so that the sizes (without dictionary data) are about the same as before? Maybe dictionaries should only exist in the dynamically allocated ringbuffer? John Ogness