From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934221AbdDFRVD (ORCPT ); Thu, 6 Apr 2017 13:21:03 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:33896 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933930AbdDFRUy (ORCPT ); Thu, 6 Apr 2017 13:20:54 -0400 Date: Thu, 6 Apr 2017 19:20:52 +0200 From: Pavel Machek To: Sergey Senozhatsky Cc: Steven Rostedt , Petr Mladek , Jan Kara , Andrew Morton , Linus Torvalds , Peter Zijlstra , "Rafael J . Wysocki" , Eric Biederman , Greg Kroah-Hartman , Jiri Slaby , 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: <20170406172051.GC10363@amd> References: <20170329092511.3958-1-sergey.senozhatsky@gmail.com> <20170329092511.3958-5-sergey.senozhatsky@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DSayHWYpDlRfCAAQ" Content-Disposition: inline In-Reply-To: <20170329092511.3958-5-sergey.senozhatsky@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --DSayHWYpDlRfCAAQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > 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. >=20 > This patch adds printk_emergency_begin/on sections. >=20 > Signed-off-by: Sergey Senozhatsky I don't like this. It is symptom of printk getting much more fragile now. Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --DSayHWYpDlRfCAAQ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAljmePMACgkQMOfwapXb+vLpcQCdFNGShl8yUKWg7Qc+Nx4OCVMV 3PIAn0BlTpkyZv8bSxguFQvoCoOtLo3N =jl5X -----END PGP SIGNATURE----- --DSayHWYpDlRfCAAQ--