Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp669928imm; Thu, 4 Oct 2018 01:05:45 -0700 (PDT) X-Google-Smtp-Source: ACcGV60b9Wj31s/w3B1wedGzkS21y5U1pn2IxavdogGp3tIpahgb/XkaVLVozHoXhAv3tcC9J4Mt X-Received: by 2002:a63:dc41:: with SMTP id f1-v6mr4643586pgj.214.1538640345072; Thu, 04 Oct 2018 01:05:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538640345; cv=none; d=google.com; s=arc-20160816; b=NhhB7Q7KlVMjnLRKr2OZoDU6wmlWHVsm3J9CFFtHLn4eZ+/fEfBA7KSs/G2vsRyQG+ /AGuHJImF4KPNyAS9dfnGXgTBSqKzC1n/ncG2Y2fecUV56tg9b+Si5jTdArz5V2ys08G UJg01/7lb0cwsPVAtAXbkcITbMx4gENjkzR0mR0gaUxkehYUIpbX/CexuZl2bOoumSaS jvMVHqRiJc0xKHc82TV+6N2rbLCGhkSQCBx5iR99ETD3HS8T7ZidKvjche7bqEfCnhhE ObrrlenOCNGR/IhFQ/aV/3LRl7Ru4fUfzHvQ3pbFxSsty4hbluGnhUK6wVFrBG+Cdy6E oXOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=CGiBDWlIpRh8VALnhCWgMozJdSr2mchsYAxFy2Px9jk=; b=IHxwYTCh/UIhFc5sR6GOJz3Ahod/+P0XbVG7eJuk7rKtuZoIXLYtUUrEfdUCqIz/QE pJG6BmFkrBUu4WJ2dao4JBXecmfbV896mv8FvqIZCMqa6x2Cnr5QCkhCezChYIav9+bN V99CNAtS6ctj1ZiUEy58b4g0/0PshApRKb+UiWQJi1Eb0HY+D63OBw7I8u3bs3uxy6Zx JagXjAHwqBLwblJrC/3Zi9JsYidvA4htKIn7hGtqn+Wyzf78KZ4ltFTRltT5Bw1XYfN/ eSYufqsRPF5jNgzgDSVsS9WLLhD7yMjwGquXnvBJyfufRH/OAg4Z1d/StUbfgem+dH0X uSBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bbd9mv5S; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 20-v6si3986133pgk.190.2018.10.04.01.05.28; Thu, 04 Oct 2018 01:05:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bbd9mv5S; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727690AbeJDO5M (ORCPT + 99 others); Thu, 4 Oct 2018 10:57:12 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:46675 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727476AbeJDO5M (ORCPT ); Thu, 4 Oct 2018 10:57:12 -0400 Received: by mail-pg1-f196.google.com with SMTP id a5-v6so2763797pgv.13; Thu, 04 Oct 2018 01:05:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=CGiBDWlIpRh8VALnhCWgMozJdSr2mchsYAxFy2Px9jk=; b=bbd9mv5SY1VLmXLSMxoeTFG/zkTLPL+nev4CnwlIsJ+W3H/vf8XTlxqCiiUdzTXrV/ ZHOSTtzVwZV40StvtHcO/KEnxAfsxF0wAVlLAQsxhPSFEj/OU+rxGu8Cb4xnZFaVN9uE iuIIln6lvljMJ6xgsZfzGr2fn+WkCG18WektqtJRK4bnHvhG23lUfYpjQuwHR2dlQyR6 ukXs5kC9mbeQ4GoxMqd34boXr+oY+6e3Eozn/kUV0Dxp+5jwHYLcoLUfSr/Fe0xe3PTb t6uLzyrK/tfJQgzBQSNDcFGL2DgSVFpo4vBBwIh/4IUo6EDsaqMx/xfeDHEHEVBayf0K wpew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=CGiBDWlIpRh8VALnhCWgMozJdSr2mchsYAxFy2Px9jk=; b=Lb4j+w22TYfP1lb+1jTZwdvamd8ZmXGTZQrLpJSkbFHVEJh1iduQbz2rSC4wT8r8N1 DR3wt3NLRlZlW4x3f5XYZIwdNvFTSlzcs0mcTFPiamq5831xSOLunKoLYpah/KJdN8ie B0t1JVFenASrVtptDqira8jRP9oTzEGecFHeSMOOZORNRSkNRcRWHAl6+ZTAYMQRhX9B VKwq/2qphzlipPEUTxK0sjmpylHys5H4jx3Ut3eIw9NWWByOQILqS0MpTIXDtLIXicHU 7Rqm0HrcMZcorBtDGDNvWnHE0rT5Af1GIzwpXlb6R7X6BDFDAfjxeFVIPh8oeyu3rO3w hyhw== X-Gm-Message-State: ABuFfoi59lyCrC/kvUhW/Hzkby4VCfpuMjNbtzNjGWkbkh8Y8q61iSX3 amVo92prSS+g6WcVmYmLxOs= X-Received: by 2002:a63:a012:: with SMTP id r18-v6mr4788365pge.282.1538640310882; Thu, 04 Oct 2018 01:05:10 -0700 (PDT) Received: from localhost ([175.223.49.70]) by smtp.gmail.com with ESMTPSA id h19-v6sm6892239pfk.71.2018.10.04.01.05.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 04 Oct 2018 01:05:09 -0700 (PDT) Date: Thu, 4 Oct 2018 17:05:06 +0900 From: Sergey Senozhatsky To: Daniel Wang Cc: rostedt@goodmis.org, Petr Mladek , stable@vger.kernel.org, Alexander.Levin@microsoft.com, akpm@linux-foundation.org, byungchul.park@lge.com, dave.hansen@intel.com, hannes@cmpxchg.org, jack@suse.cz, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Mathieu Desnoyers , Mel Gorman , mhocko@kernel.org, pavel@ucw.cz, penguin-kernel@i-love.sakura.ne.jp, peterz@infradead.org, tj@kernel.org, torvalds@linux-foundation.org, vbabka@suse.cz, Cong Wang , Peter Feiner , Sergey Senozhatsky Subject: Re: 4.14 backport request for dbdda842fe96f: "printk: Add console owner and waiter logic to load balance console writes" Message-ID: <20181004080506.GB12879@jagdpanzerIV> References: <20181001152324.72a20bea@gandalf.local.home> <20181002084225.6z2b74qem3mywukx@pathway.suse.cz> <20181002212327.7aab0b79@vmware.local.home> <20181003091400.rgdjpjeaoinnrysx@pathway.suse.cz> <20181003133704.43a58cf5@gandalf.local.home> <20181004074442.GA12879@jagdpanzerIV> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181004074442.GA12879@jagdpanzerIV> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (10/04/18 16:44), Sergey Senozhatsky wrote: > So... Just an idea. Can you try a very dirty hack? Forcibly increase > oops_in_progress in panic() before console_flush_on_panic(), so 8250 > serial8250_console_write() will use spin_trylock_irqsave() and maybe > avoid deadlock. E.g. something like below? [this is not a patch; just a theory]: --- diff --git a/kernel/panic.c b/kernel/panic.c index 8b2e002d52eb..188338a55d1c 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -233,7 +233,13 @@ void panic(const char *fmt, ...) if (_crash_kexec_post_notifiers) __crash_kexec(NULL); + /* + * Decrement oops_in_progress and let bust_spinlocks() to + * unblank_screen(), console_unblank() and wake_up_klogd() + */ bust_spinlocks(0); + /* Set oops_in_progress, so we can reenter serial console driver*/ + bust_spinlocks(1); /* * We may have ended up stopping the CPU holding the lock (in