From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933338AbdCaPGX (ORCPT ); Fri, 31 Mar 2017 11:06:23 -0400 Received: from mx2.suse.de ([195.135.220.15]:58706 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932934AbdCaPGV (ORCPT ); Fri, 31 Mar 2017 11:06:21 -0400 Date: Fri, 31 Mar 2017 17:06:18 +0200 From: Petr Mladek To: Sergey Senozhatsky Cc: Steven Rostedt , Jan Kara , Andrew Morton , Linus Torvalds , Peter Zijlstra , "Rafael J . Wysocki" , Eric Biederman , Greg Kroah-Hartman , Jiri Slaby , Pavel Machek , Len Brown , linux-kernel@vger.kernel.org, Sergey Senozhatsky Subject: Re: [RFC][PATCHv2 4/8] pm: switch to printk.emergency mode in unsafe places Message-ID: <20170331150618.GC3452@pathway.suse.cz> References: <20170329092511.3958-1-sergey.senozhatsky@gmail.com> <20170329092511.3958-5-sergey.senozhatsky@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170329092511.3958-5-sergey.senozhatsky@gmail.com> 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 On Wed 2017-03-29 18:25:07, Sergey Senozhatsky wrote: > It's not always possible/safe to wake_up() printk kernel > thread. For example, late suspend/early resume may printk() > while timekeeping is not initialized yet, so calling into the > scheduler may result in recursive warnings. > > Another thing to notice is the fact PM at some point > freezes user space and kernel threads: freeze_processes() > and freeze_kernel_threads(), correspondingly. Thus we need > printk() to operate in old mode there and attempt to > immediately flush pending kernel message to the console. > > This patch adds printk_emergency_begin/on sections. > > Signed-off-by: Sergey Senozhatsky It looks reasonable to me. Feel free to use: Reviewed-by: Petr Mladek Well, it still would be great if people more familiar with this code look at it. Best Regards, Petr