From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751617AbdJPA1R (ORCPT ); Sun, 15 Oct 2017 20:27:17 -0400 Received: from smtprelay0082.hostedemail.com ([216.40.44.82]:48766 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751352AbdJPA1Q (ORCPT ); Sun, 15 Oct 2017 20:27:16 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 20,1.5,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::,RULES_HIT:41:355:379:421:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2194:2199:2328:2393:2553:2559:2562:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3872:3874:4250:5007:6119:6261:7514:7576:7875:7903:10004:10400:10450:10455:10848:10967:11026:11232:11658:11914:12043:12296:12438:12740:12760:12895:13069:13311:13357:13439:14181:14659:14721:19904:19999:21080:21324:21451:21627:30034:30054:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: net48_5c6d36bee7146 X-Filterd-Recvd-Size: 2490 Date: Sun, 15 Oct 2017 20:27:15 -0400 From: Steven Rostedt To: Sergey Senozhatsky Cc: LKML , Petr Mladek , Peter Zijlstra , Andrew Morton Subject: Re: [PATCH] printk: Remove superfluous memory barriers from printk_safe Message-ID: <20171015202715.5c3bb075@vmware.local.home> In-Reply-To: <20171014092129.GD2973@tigerII.localdomain> References: <20171011124647.7781f98f@gandalf.local.home> <20171014092129.GD2973@tigerII.localdomain> X-Mailer: Claws Mail 3.15.1-dirty (GTK+ 2.24.31; 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 List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 14 Oct 2017 18:21:29 +0900 Sergey Senozhatsky wrote: > On (10/11/17 12:46), Steven Rostedt wrote: > > From: Steven Rostedt (VMware) > > > > The variable printk_safe_irq_ready is set and never cleared at system > > boot up, when there's only one CPU active. It is set before other > > CPUs come on line. Also, it is extremely unlikely that an NMI would > > trigger this early in boot up (which I wonder why we even have this > > variable at all). > > it's not only NMI related, printk() recursion can happen at any stages, > including... um... wait a second. ... including the "before we set up > per-CPU areas" stage? hmm... smells like a bug? I think this was just being overly paranoid. > > do we need to move per-CPU printk_safe buffers out of per-CPU and turn > it into a global static buffer? like logbuf, and just give every CPU a > starting offset of its printk_safe_logbuf part. > > IOW, > > char printk_safe_logbuf[number of cpus * sizeof printk safe buffer]; > > cpu0 offset 0, up to sizeof printk safe buffer > cpu1 offset sizeof printk safe buffer, up to 2 * sizeof printk safe buffer Let's not make this any more complicated than it has to be. > > etc. > > or... at least. avoid stoing to per-CPU printk-safe/printk-nmi buffers > unless we've got per-CPU areas set up? or am I hallucinating? We can keep the flag as is, it's highly unlikely to be a problem. -- Steve