Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752717AbeAJWo6 (ORCPT + 1 other); Wed, 10 Jan 2018 17:44:58 -0500 Received: from mail-qk0-f182.google.com ([209.85.220.182]:39118 "EHLO mail-qk0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752364AbeAJWoz (ORCPT ); Wed, 10 Jan 2018 17:44:55 -0500 X-Google-Smtp-Source: ACJfBoub9OrvCXzakbk6kbG5C07PNyoMOSUofc9AOYPPWcVYkayOvUadGdXrnTa1VYYtVnlexbw4QA== Date: Wed, 10 Jan 2018 14:44:51 -0800 From: Tejun Heo To: Steven Rostedt Cc: Petr Mladek , Sergey Senozhatsky , akpm@linux-foundation.org, linux-mm@kvack.org, Cong Wang , Dave Hansen , Johannes Weiner , Mel Gorman , Michal Hocko , Vlastimil Babka , Peter Zijlstra , Linus Torvalds , Jan Kara , Mathieu Desnoyers , Tetsuo Handa , rostedt@home.goodmis.org, Byungchul Park , Sergey Senozhatsky , Pavel Machek , linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 0/2] printk: Console owner and waiter logic cleanup Message-ID: <20180110224451.GI3460072@devbig577.frc2.facebook.com> References: <20180110132418.7080-1-pmladek@suse.com> <20180110140547.GZ3668920@devbig577.frc2.facebook.com> <20180110130517.6ff91716@vmware.local.home> <20180110181252.GK3668920@devbig577.frc2.facebook.com> <20180110134157.1c3ce4b9@vmware.local.home> <20180110185747.GO3668920@devbig577.frc2.facebook.com> <20180110141758.1f88e1a0@vmware.local.home> <20180110193451.GB3460072@devbig577.frc2.facebook.com> <20180110144455.66fe53c9@vmware.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180110144455.66fe53c9@vmware.local.home> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Hello, Steven. On Wed, Jan 10, 2018 at 02:44:55PM -0500, Steven Rostedt wrote: > Yes, there can be the case that printks are added via an interrupt, but > then again, it's an issue that a single CPU. And printks from interrupt > context should be considered critical, part of the ASAP category. If > they are not critical, then they shouldn't be doing printks. That may > be a place were we can add a "printk_delay", for things like non > critical printks in interrupt context, that can trigger offloading? Ideally, if we can annoate all those, that would be great. I don't feel too confident about that tho. Here is one network driver that we deal with often. $ wc -l $(git ls-files drivers/net/ethernet/mellanox/mlx5) | tail -1 48029 total It's close to 50k lines of code and AFAICT this seems to be the trend. Most things which are happening in the driver are complicated and sometimes lead to surprising behaviors. With memory allocation failures thrown in, idk. I think our exposure to this sort of problem is pretty wide and we can't reasonably keep close eyes on them, especially for problems which only happen under high stress conditions which aren't tested that easily. > > Oh yeah, sure. It might actually be pretty simple to combine into > > your solution. For example, can't we just always make sure that > > there's at least one sleepable context which participates in your > > pingpongs, which only kicks in when a particular context is trapped > > too long? > > The solution can be extended to that if the need exists, yes. I think it'd be really great if the core code can protect itself against these things going haywire. We can ignore messages generated while being recursive from netconsole, but that would mean, for example, if that giant driver messes up in that path (netconsole under memory pressure), it'd be painful to debug. So, if we can, it'd be really great to have a generic protection which can handle these situations. Thanks. -- tejun