From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E02EC10F14 for ; Thu, 10 Oct 2019 08:37:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6252F20B7C for ; Thu, 10 Oct 2019 08:37:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6252F20B7C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 114A18E0006; Thu, 10 Oct 2019 04:37:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0C59F8E0003; Thu, 10 Oct 2019 04:37:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EF5D58E0006; Thu, 10 Oct 2019 04:37:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0155.hostedemail.com [216.40.44.155]) by kanga.kvack.org (Postfix) with ESMTP id CDEA88E0003 for ; Thu, 10 Oct 2019 04:37:13 -0400 (EDT) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id 5BF071EF2 for ; Thu, 10 Oct 2019 08:37:13 +0000 (UTC) X-FDA: 76027220346.27.goose21_5c194a095e00c X-HE-Tag: goose21_5c194a095e00c X-Filterd-Recvd-Size: 2993 Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by imf49.hostedemail.com (Postfix) with ESMTP for ; Thu, 10 Oct 2019 08:37:12 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 1BA0BB048; Thu, 10 Oct 2019 08:37:11 +0000 (UTC) Date: Thu, 10 Oct 2019 10:37:10 +0200 From: Michal Hocko To: Sergey Senozhatsky Cc: Peter Oberparleiter , Qian Cai , Christian Borntraeger , Petr Mladek , akpm@linux-foundation.org, rostedt@goodmis.org, peterz@infradead.org, linux-mm@kvack.org, john.ogness@linutronix.de, david@redhat.com, linux-kernel@vger.kernel.org, Heiko Carstens , Vasily Gorbik Subject: Re: [PATCH v2] mm/page_isolation: fix a deadlock with printk() Message-ID: <20191010083710.GF18412@dhcp22.suse.cz> References: <20191007144937.GO2381@dhcp22.suse.cz> <20191008074357.f33f6pbs4cw5majk@pathway.suse.cz> <20191008082752.GB6681@dhcp22.suse.cz> <1570550917.5576.303.camel@lca.pw> <1157b3ae-006e-5b8e-71f0-883918992ecc@linux.ibm.com> <20191009142623.GE6681@dhcp22.suse.cz> <20191010051201.GA78180@jagdpanzerIV> <20191010074049.GD18412@dhcp22.suse.cz> <20191010081629.GA120986@jagdpanzerIV> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191010081629.GA120986@jagdpanzerIV> User-Agent: Mutt/1.10.1 (2018-07-13) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu 10-10-19 17:16:29, Sergey Senozhatsky wrote: > On (10/10/19 09:40), Michal Hocko wrote: > [..] > > > > Considering that console.write is called from essentially arbitrary code > > > > path IIUC then all the locks used in this path should be pretty much > > > > tail locks or console internal ones without external dependencies. > > > > > > That's a good expectation, but I guess it's not always the case. > > > > > > One example might be NET console - net subsystem locks, net device > > > drivers locks, maybe even some MM locks (skb allocations?). > > > > I am not familiar with the netconsole code TBH. If there is absolutely > > no way around that then we might have to bite a bullet and consider some > > of MM locks a land of no printk. > > So this is what netconsole does (before we pass on udp to net device > driver code, which *may be* can do more allocations, I don't know): > > write_msg() > netpoll_send_udp() > find_skb() > alloc_skb(len, GFP_ATOMIC) > kmem_cache_alloc_node() > > You are the right person to ask this question to - how many MM > locks are involved when we do GFP_ATOMIC kmem_cache allocation? > Is there anything to be concerned about? At least zone->lock might involved. Maybe even more. -- Michal Hocko SUSE Labs