Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp2045887ima; Mon, 22 Oct 2018 03:20:33 -0700 (PDT) X-Google-Smtp-Source: ACcGV630LQ3auRNOjDY7PJK8e+JjxuTdnFhIQeVN0UmmurNf7vpJor7wRCg6tAhXQsJMzInCsLJS X-Received: by 2002:a62:7501:: with SMTP id q1-v6mr44687515pfc.225.1540203633754; Mon, 22 Oct 2018 03:20:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540203633; cv=none; d=google.com; s=arc-20160816; b=HdxXI3eF8NLCdLuWOsULYTfuvE114w8FyDrzqe7PdSEtOCex/xA2Y2QBu+nAJ8PD28 AikGnHUXY90zceXjSLiCtHe7jVk6u/hgqGS76cSTNz4ZfPkP9XyosW+0//vnkC4mLXm4 kc2qYnSs9Q136Xc076Mug4f7+Vr7utlg34YXOmqEsmhIY4HeXE4jSBJhuQJJ3I4mbxQk jUI2JO9JyAD6tElhNJI/p+zPW7d4AgH5fQiH92Fy+PxogNQHsbY2uSgrh4yclROTCENO uVBfahLU6JzCpxWgZT88yZfEp/wpnEjfiHTl94N8PuQ4cLTQjFtC7khb7k6d3Z8dR/Rr GC4g== 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=QM4Yu+1p2haCXP5W9H76haVjc7F3evCtWrd2v/xitOw=; b=W49DovmNhR2QFcsx6N81Beh3gErqNaFStVI60ZiCeZTAvkYUrjfuPF3bAojiyabQXj EZPyU2K/YUq3V9hOzudLK95ucWWWpztL6PW5Ql9J7Mfgb2wYNp5W1goQIXCDw/0BOXY3 D/ISO07KlkD/7r6adB5aTDWxTnXCUJpmhz5LAoUTvO8KMUHdf1xi8DbmLWJU0w2fx7x5 uVr2ke5NV7SOwci/SOgtFexz9vZL3fMhO3rUehskjIfrv4iSqWuEXrn/VaNuBZwJmJz/ bnAJHlWmNsmgshcgeyYOM0c7kj7QlvDnzkrsA2Z0UFMOE4FQgUvwcLbqESe0Uq6qGcwt r24w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CHm5LSoV; 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 o1-v6si4318407pgf.80.2018.10.22.03.20.18; Mon, 22 Oct 2018 03:20:33 -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=CHm5LSoV; 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 S1728430AbeJVS1u (ORCPT + 99 others); Mon, 22 Oct 2018 14:27:50 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:40831 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727045AbeJVS1u (ORCPT ); Mon, 22 Oct 2018 14:27:50 -0400 Received: by mail-pf1-f193.google.com with SMTP id g21-v6so12656899pfi.7; Mon, 22 Oct 2018 03:09:58 -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=QM4Yu+1p2haCXP5W9H76haVjc7F3evCtWrd2v/xitOw=; b=CHm5LSoVjAZjGaGgMuBuNh4+3ZpPpDoZQbdQjesuP7zkg519prfK7r9IOpGbaMM0h8 oB0Qu7rxHy6XEccKfV6D3sAlLvHqCDlDB42aRDlPBcXLCb76QPyNtq+Rp5JbYDwfhAmG ioV3DTSTy/eyTTj82EJa83Vl3rXU4ogjqdEzrfZeP5wR2q7PbT31NrpZ4+gBRgZsvUMQ qo09zwztoKi/N7xrvk6wtd1krCUnLA7SRB+zx98oPshqInmqdnoKMcTjyggj5mpd9hIA ac2ox4xC12j/c+cK98YZRwXvb2y3qLfHNY7yvO7YEJ/daof5Cn3e2dlJjoFmZdteMRzm NGFg== 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=QM4Yu+1p2haCXP5W9H76haVjc7F3evCtWrd2v/xitOw=; b=mV1m/jm/1EYQ7+eno7HELe7+FuPuAd3cBd/HzYLP4CtfiuGYqL2RJhA25EMSLlN013 CBiVhYfzA/zoKJSjSUqiFgtxAm22FG4GvvhfCnMlFgFNpbN7XhSVvfTpD24Yo2lJbTrJ j2IEjimX3sTTrKrRq2hrS4ulOGXRkTykVOH/DfRJBWFwJD2XRDf2jC9ocbPxZJj06MTQ lzvNvXgC0Z+DL8Bwid5+u09qsx7Xnd4psQ8MiC8YTiVPokssegviIo8Ivk6zE3G7ksXJ eiw29xVsyGQHCb1xFL6MckuxbvOaQAB0xV+azlnzgdxvQz0H5x343N2Y09uoLaJjftlR FJrg== X-Gm-Message-State: ABuFfogtu59Y+UpC2ftOIxwHzNmcK1sPc+Gy5sZHe+e0hhqCMdELgLIX LWw2yZxqOf2Q3P7ko6evejY= X-Received: by 2002:a62:de05:: with SMTP id h5-v6mr45339377pfg.258.1540202997589; Mon, 22 Oct 2018 03:09:57 -0700 (PDT) Received: from localhost ([39.7.58.252]) by smtp.gmail.com with ESMTPSA id j25-v6sm36021730pff.116.2018.10.22.03.09.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Oct 2018 03:09:55 -0700 (PDT) Date: Mon, 22 Oct 2018 19:09:52 +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: <20181022100952.GA1147@jagdpanzerIV> References: <20181002212327.7aab0b79@vmware.local.home> <20181003091400.rgdjpjeaoinnrysx@pathway.suse.cz> <20181003133704.43a58cf5@gandalf.local.home> <20181004074442.GA12879@jagdpanzerIV> <20181004083609.kcziz2ynwi2w7lcm@pathway.suse.cz> <20181004085515.GC12879@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 (10/21/18 11:09), Daniel Wang wrote: > > Just got back from vacation. Thanks for the continued discussion. Just so > I understand the current state. Looks like we've got a pretty good explanation > of what's going on (though not completely sure), and backporting Steven's > patches is still the way to go? Up to -stable maintainers. Note, with or without Steven's patch, the non-reentrable consoles are still non-reentrable, so the deadlock is still there: spin_lock_irqsave(&port->lock, flags) panic() console_flush_on_panic() spin_lock_irqsave(&port->lock, flags) // deadlock // And I wouldn't mind to have more reviews/testing on [1]. 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 see that Sergey had sent an RFC series for similar things. Are those > trying to solve the deadlock problem in a different way? Umm, I wouldn't call it "another way". It turns non-reentrant serial consoles to re-entrable ones. Did you test patch [1] from that series on you environment, by the way? [1] lkml.kernel.org/r/20181016050428.17966-2-sergey.senozhatsky@gmail.com -ss