Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp403596imu; Thu, 8 Nov 2018 22:49:17 -0800 (PST) X-Google-Smtp-Source: AJdET5e6ADr4FVTuCyIHlJDo/eOlInDC3DYwhGLCWu2Q1bGBzw8vYNe6bL6BQKJ7qWygR0Jxsdyj X-Received: by 2002:a63:f547:: with SMTP id e7mr6602809pgk.182.1541746157224; Thu, 08 Nov 2018 22:49:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541746157; cv=none; d=google.com; s=arc-20160816; b=DQrYow36ynQlx43f7hwQqiMW79r9mVEBnlT07sFSyydy2K0zuYbv7PPOK8izoJpFOt IQBDvc3Z9TmfzPYkw5Sts+hOcI/kUyxPUsLEvN8Or6TlkBmQ+XWrALCH6oFADQCvIEBE kyG/PGgdhUY1BwbilRDCG2hGpE0Rak3bHs9gDTN2WwaZeQgILx4h9bZpR0JriLcq+hoF NpsAZo08zVj18Xp6MHjmVUoheAF653ilzir5whqS4T8c/YBSgdrgRpFEURHZHP/dEB2Y zj2BtyEo02LRwc4+GRcqCi+RxhJ4fo++hgTleze9puKnUxYgnes4psmR1sKjbpSrX6e/ ps6w== 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=7nHh+0TwFk91NgvrGTFF3LoMskhUBh2w9Bte8yUfnA0=; b=iY+j7HMgfUeU3qmb99/763Ug9PvubcmSh4s8n38BXiBFeOEBTWoUEXC8DGTqPP07wo mWuNmztk4hpVIyFf9qvhQxfjwEXVCdCpxY0pB/gGYW3ZHDXIi4MFTiEN+c3kBV8nJPhv QoeyzFnEGdYOOAdA5/jLl+QIn4059XX/ZcTRUWyL1RmH+yfDO/WeFyZRMpT6oI/ki8lu AimLk+rguwBCUTmmqFUpd9dcRsj3E3/IgRu5IcMr3lF0o2t27KODJoQYzr1PjwynY/1G lLZ9YRHCz8YZ1XNc3RtY3h3pswHAlFHRm/dJU6cpcfoFw0ZLxbQpcTAL7aSap+w4KMX3 HSsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RFKU9Xi3; 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 o10-v6si6051172pgl.134.2018.11.08.22.49.01; Thu, 08 Nov 2018 22:49:17 -0800 (PST) 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=RFKU9Xi3; 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 S1728236AbeKIQ1V (ORCPT + 99 others); Fri, 9 Nov 2018 11:27:21 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:41869 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728103AbeKIQ0y (ORCPT ); Fri, 9 Nov 2018 11:26:54 -0500 Received: by mail-pl1-f196.google.com with SMTP id p16-v6so491103plr.8; Thu, 08 Nov 2018 22:47:46 -0800 (PST) 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=7nHh+0TwFk91NgvrGTFF3LoMskhUBh2w9Bte8yUfnA0=; b=RFKU9Xi3Yp7YCfNhsIPTJbv4o0IJi+S7PkI+LmIvqwAiCqyhXrBuvJTmzhM9zlw6Ir WzxkoAcciw+uvyPKITduXMHBhvsTupJxcN/s2NvKHsTRATBH8zBBA9Vf2srHPt2lWxcy 8i9ZVnPWYH7KtnatiNhPgo1rrFBNycRj4kdZT9/fRm+/d8Fi6RXGVwmNfkv2ekkIIIrp HcaO7ewU694DZwZpyRaTq7e5FU/9GaVv81kAXKRWnUp+vV2fxE7LsR33IP6vZGRriDlf MJz4heqFXFfvOv2cymYeo72N7SKRrkafY8hfRAZzC8cwamk5LjbSUoUmuc/mXePCngz7 8CFA== 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=7nHh+0TwFk91NgvrGTFF3LoMskhUBh2w9Bte8yUfnA0=; b=naiIzg2k+NdBS0cuISi/aAT90bcr9/E+UVrKZq0J8wk4llKF/OzUvH2rJXhEU/yxWZ mna2UUIeHfIJm8jdeak/X/LHaZdvzKbFt0SBTCg1+n+iaufbxRS17kJPow3K2FL9ACeG v923T6TewetSyLCarlY3jZYgRJSCJLSYP3YpzQEm4Vw4mEdJc8IxSUNc2H5B0Z49yYuT wIjTjIWukvFjzS3UdPVNCP0D/MwAhede6+muH0V31hRpL/yvXEvn7Bt02h+TVui+/M9l H1mhn/nmOtzb6C9ViHa1sP3xghFhudMLQR2Qtb13P83KtN4y4uN4FN5OfyYfcaCUhEdA NAyQ== X-Gm-Message-State: AGRZ1gLSClXBQLG8H3O6bCDzYuMZ7IlvlGwijnn8iHfBf0idri5EsyRw +7N3qMxvXCySjq9pQ5tGaX0= X-Received: by 2002:a17:902:3a5:: with SMTP id d34-v6mr7727657pld.110.1541746065505; Thu, 08 Nov 2018 22:47:45 -0800 (PST) Received: from localhost ([110.70.55.191]) by smtp.gmail.com with ESMTPSA id v20-v6sm11429198pfj.107.2018.11.08.22.47.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Nov 2018 22:47:44 -0800 (PST) Date: Fri, 9 Nov 2018 15:47:40 +0900 From: Sergey Senozhatsky To: Daniel Wang Cc: sergey.senozhatsky.work@gmail.com, Petr Mladek , rostedt@goodmis.org, 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 Subject: Re: 4.14 backport request for dbdda842fe96f: "printk: Add console owner and waiter logic to load balance console writes" Message-ID: <20181109064740.GE599@jagdpanzerIV> References: <20181003091400.rgdjpjeaoinnrysx@pathway.suse.cz> <20181003133704.43a58cf5@gandalf.local.home> <20181004074442.GA12879@jagdpanzerIV> <20181004083609.kcziz2ynwi2w7lcm@pathway.suse.cz> <20181004085515.GC12879@jagdpanzerIV> <20181022100952.GA1147@jagdpanzerIV> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 (11/01/18 09:05), Daniel Wang wrote: > > Another deadlock scenario could be the following one: > > > > printk() > > console_trylock() > > down_trylock() > > raw_spin_lock_irqsave(&sem->lock, flags) > > > > panic() > > console_flush_on_panic() > > console_trylock() > > raw_spin_lock_irqsave(&sem->lock, flags) // deadlock > > > > There are no patches addressing this one at the moment. And it's > > unclear if you are hitting this scenario. > > I am not sure, but Steven's patches did make the deadlock I saw go away... You certainly can find cases when "busy spin on console_sem owner" logic can reduce some possibilities. But spin_lock(&lock); NMI; spin_lock(&lock); code is still in the kernel. > A little swamped by other things lately but I'll run a test with it. > If it works, would you recommend taking your patch alone Let's first figure out if it works. -ss