From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752617AbdKHOdl (ORCPT ); Wed, 8 Nov 2017 09:33:41 -0500 Received: from mail-qt0-f173.google.com ([209.85.216.173]:57048 "EHLO mail-qt0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752510AbdKHOdk (ORCPT ); Wed, 8 Nov 2017 09:33:40 -0500 X-Google-Smtp-Source: ABhQp+R3TgwYwomSzkMXAAKSIWkLTxM5T/Re8rcl9Eb90VBvoNBzi/ZLn79jl6K862Ur0k6/xVmLbA== Date: Wed, 8 Nov 2017 06:33:36 -0800 From: Tejun Heo To: Sergey Senozhatsky Cc: Sergey Senozhatsky , Petr Mladek , Steven Rostedt , linux-kernel@vger.kernel.org, kernel-team@fb.com, Linus Torvalds , Andrew Morton Subject: Re: [PATCH 2/2] Subject: printk: Don't trap random context in infinite log_buf flush Message-ID: <20171108143322.GC4164960@devbig577.frc2.facebook.com> References: <20171102135146.GN3252168@devbig577.frc2.facebook.com> <20171102135258.GO3252168@devbig577.frc2.facebook.com> <20171104042408.GB539@tigerII.localdomain> <20171107002254.GI3252168@devbig577.frc2.facebook.com> <20171107020434.GC1822@jagdpanzerIV> <20171107132331.GJ3252168@devbig577.frc2.facebook.com> <20171108052935.GB468@jagdpanzerIV> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171108052935.GB468@jagdpanzerIV> 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 Hello, On Wed, Nov 08, 2017 at 02:29:35PM +0900, Sergey Senozhatsky wrote: > > The following is a completely untested patch to show how we can put > > the console in full sync mode, just the general idea. I'm a bit > > skeptical we really wanna do this given that we already (with or > > without the patch) stay sync for most of these events due to the way > > we go async, but, yeah, if we wanna do that, we can do that. > > we've been going in a slightly different direction in printk-kthread. > > we keep printk sync by default [as opposed to previous "immediately > offload" approach]. people asked for it, some people demanded it. we > offload to printk-kthread only when we detect that this particular > task on this particular CPU has been doing printing (without rescheduling) > for 1/2 of watchdog threshold value. IOW, if we see that we are heading > towards the lockup limit then we offload. otherwise - we let it loop in > console_unlock(). FWIW, I'm still a bit skeptical whether that's the right direction. People asking for it doesn't indicate that the flipside isn't worse. Hmm... I think my impression is mostly from the fact that throughout the years I can only count few times where loss of printk messages was an actual issue. The system getting slowed down / locking up from printk message deluge was *far* more prevalent. Thanks. -- tejun