From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752040AbdBCB5l (ORCPT ); Thu, 2 Feb 2017 20:57:41 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:33179 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751570AbdBCB5k (ORCPT ); Thu, 2 Feb 2017 20:57:40 -0500 Date: Fri, 3 Feb 2017 10:57:57 +0900 From: Sergey Senozhatsky To: Steven Rostedt Cc: Sergey Senozhatsky , Sergey Senozhatsky , Andrew Morton , Petr Mladek , Linus Torvalds , Jan Kara , Tejun Heo , Calvin Owens , Ingo Molnar , Peter Zijlstra , Andy Lutomirski , Peter Hurley , linux-kernel@vger.kernel.org Subject: Re: [PATCHv7 5/8] printk: report lost messages in printk safe/nmi contexts Message-ID: <20170203015757.GB6228@jagdpanzerIV.localdomain> References: <20161227141611.940-1-sergey.senozhatsky@gmail.com> <20161227141611.940-6-sergey.senozhatsky@gmail.com> <20170201113700.5b464143@gandalf.local.home> <20170202020257.GB1954@jagdpanzerIV.localdomain> <20170202093409.3d7f617e@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170202093409.3d7f617e@gandalf.local.home> User-Agent: Mutt/1.7.2 (2016-11-26) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (02/02/17 09:34), Steven Rostedt wrote: > On Thu, 2 Feb 2017 11:02:57 +0900 > Sergey Senozhatsky wrote: > > > On (02/01/17 11:37), Steven Rostedt wrote: > > > This looks fine, but I'm curious if you tested it. That is, added a > > > bunch of printks to overflow the buffer. IIRC, I did it to the original > > > nmi code. If you haven't you may want to just to make sure it works. I > > > can also test it too if I get some time. > > > > Hello Steven, > > > > yes, I have tested it on my x86 box. > > > > Please note how you tested it in your change log. It's not really a > requirement, and you don't really have to do it. But it helps people > have warm fuzzies about the code. I'm trying to do this in the future > in my own work too. well. sure, no objections, but in this particular case it's hardly possible to hit all of those problems within a reasonable time. so what I did was just a bunch of dirty hacks to provoke the problems. something like this extern int XXX; vprintk_emit() { spin_lock(&logbuf_lock); // // in various places // if (XXX == 1) { WARN_ON(1); } spin_unlock(&logbuf_lock); } and I set/clear that XXX from one of sysfs attrs... yeah, I know... but it does what I want. so I'm not really sure I want to note this in the change log. am I wrong? -ss