Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1378860ybl; Tue, 3 Dec 2019 06:20:04 -0800 (PST) X-Google-Smtp-Source: APXvYqypgdx60I7m3+rPWK5uqNBdTE7kYOZyTDgTlFTupyZuGmif9eebV9pG2CAZHXK1YH2Dhn/M X-Received: by 2002:a05:6830:1cf:: with SMTP id r15mr3410682ota.231.1575382804118; Tue, 03 Dec 2019 06:20:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575382804; cv=none; d=google.com; s=arc-20160816; b=sIFQmsM0RWjbLjrDUb1WAXsBTaAvw4BY/CZP6VtcAvhmqi+yC+rpOag/6hKUYFMWvb 9mjdNYlaj5tTdJ783y12GeFWJctR+46f2Q8oIEePvkoZrYLPeDoWkmfaipE9lhf1mMGP YbENfA+UwUSJyqO553pr+pKRV46+SPiSGtwVCqHrLhL3cQhUq1S/DDPjoMYRhPBO/W5w 3W4n6/WRE8cOizuaFnAyuvnG0H7RyqczXKU4vD3amRRfA8z9tzNDAs7RKdZfc/fEQTB6 bonIvKlPfDe+avjFbDHuC37gsZt7OikZ3Ow/2y0hMsvebDBXejP992+t848wLjq0yc9I dDfQ== 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:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=6WnaGSsTMGftKOti8FJ+0ni64RX3PpkmH+A3UineJHk=; b=D7lbpqcb0mX4Kx2KYwoTExurUyuxZRyyLob254BHCfdgofLQdGrLxwLwPnjt+L9iOX 2KtGMY5nLpKwlPVioRyuGdh7lbmikHVEtaZvAXpDVkjZQ/TimVhKgQHqCayuxfLtvIGC 4uT1OiLiIyvENcX5hStGKr4NI16vwh7Llcbyp6vBWxaemNTo6y03FB0ATMhpvy3p6Pc9 aTF3/biws0tcjdJ6uJItDjlY+evbFrTUWZXJAik0gqDmJSu5pEU+yqohsbMYIk0wdoQn 6YOhH2aTvnOvnLK7L3Hqdq/35mmayg4KlYqzIu8xDhpWvtN51XLkFfMLS040za9BieeV GnyA== 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 p3si1326056oih.186.2019.12.03.06.19.48; Tue, 03 Dec 2019 06:20:04 -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 S1726318AbfLCOSs (ORCPT + 99 others); Tue, 3 Dec 2019 09:18:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:45034 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725957AbfLCOSq (ORCPT ); Tue, 3 Dec 2019 09:18:46 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DE35420684; Tue, 3 Dec 2019 14:18:44 +0000 (UTC) Date: Tue, 3 Dec 2019 09:18:43 -0500 From: Steven Rostedt To: Sergey Senozhatsky Cc: John Ogness , Petr Mladek , linux-kernel@vger.kernel.org, Peter Zijlstra , Linus Torvalds , Greg Kroah-Hartman , Andrea Parri , Thomas Gleixner , Sergey Senozhatsky , Brendan Higgins , kexec@lists.infradead.org Subject: Re: [RFC PATCH v5 1/3] printk-rb: new printk ringbuffer implementation (writer) Message-ID: <20191203091843.678461e4@gandalf.local.home> In-Reply-To: <20191203011721.GH93017@google.com> References: <20191128015235.12940-1-john.ogness@linutronix.de> <20191128015235.12940-2-john.ogness@linutronix.de> <20191202154841.qikvuvqt4btudxzg@pathway.suse.cz> <20191202155955.meawljmduiciw5t2@pathway.suse.cz> <87sgm2fzuh.fsf@linutronix.de> <20191203011721.GH93017@google.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 3 Dec 2019 10:17:21 +0900 Sergey Senozhatsky wrote: > > > BTW: If I am counting correctly. The ABA problem would happen when > > > exactly 2^30 (1G) messages is written in the mean time. > > > > All the ringbuffer code assumes that the use of index numbers handles > > the ABA problem (i.e. there must not be 1 billion printk's within an > > NMI). If we want to support 1 billion+ printk's within an NMI, then > > perhaps the index number should be increased. For 64-bit systems it > > would be no problem to go to 62 bits. For 32-bit systems, I don't know > > how well the 64-bit atomic operations are supported. > > ftrace dumps from NMI (DUMP_ALL type ftrace_dump_on_oops on a $BIG > machine)? 1G seems large enough, but who knows. ftrace dump from NMI is the most likely case to hit this, but when that happens, you are in debugging mode, and the system usually becomes unreliable at this moment. I agree with Petr, that we should not complicate the code more to handle this theoretical condition. -- Steve