Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2070338ybp; Thu, 10 Oct 2019 01:37:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqwn8TVppdNlyVcKNuvixT+JnFtzLu5PYmNVjRiK9XfAufYFEGyPvvzUZuDFER84UWhuhUVf X-Received: by 2002:a17:906:5292:: with SMTP id c18mr6901582ejm.129.1570696672864; Thu, 10 Oct 2019 01:37:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570696672; cv=none; d=google.com; s=arc-20160816; b=Uvm7SVVqjkDBf+28bv4DcLzUHywfWftM8Zih2CYYLpe1sKO+q+nUkJZKI8aK5wXyyN 1HSgLOzHDPaXdLLn9wCIyh/yT6yO7HNaBIiSwWs1epw+E/H9sOQw7le+843OexXHt9dT fA/3ORddxmYRYSbvHilDRjsvqwfp9V4IgbzIjiDUgp0//zIBpoZSCg9MBBQKOA5w7ftu 2hF5BeZvvygqT8Rpa5fc0pfgvL0TepGrxOKd2+uJRxczovCQ2PG+y0gbgp4PbO8IeBBp 8BehirQlEKXQWfxsar6MiaO2SB2TBI3YxMwJ5wDNaCxQwkIgQ5oxOHkgLGAaqGhIyiIl ZApA== 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; bh=h0awE3/stEOiYpDf/wmlYToc2LJfaqQZgWOj/iS2gyo=; b=qvXfsa0CuFexF7BuOqSmVNnpx7HQaUNwaxZiHBXHu33RK/HkJiiwrbPgI3H/0VxCrX XNqCNzNxRNqqk22ZwUiXbg03p684euofFPfqOS37Bz5Ki12JtG2NAqnHZHaH2hyI1dem U8SdLtAcwtSnsLONN773pL9JpAJJ8zovOW/mpMlR62WtDC03F9mzjt9KMwDNDCR8RGls 3GGQCM9Q1IVf1I+98X8g7H6IAggab733Zktw6QyI9K4rP6EaEQ2zVMbV0NC0H9g/fN16 9lNadUUfxR1K4YwEBRyKgi9/gUlPBFMx4DDFTY2FTsD2NJpGzqXgUJOxjFwX989XIBXy pG/w== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ha16si2683049ejb.258.2019.10.10.01.37.29; Thu, 10 Oct 2019 01:37:52 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733121AbfJJIhN (ORCPT + 99 others); Thu, 10 Oct 2019 04:37:13 -0400 Received: from mx2.suse.de ([195.135.220.15]:36290 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729932AbfJJIhN (ORCPT ); Thu, 10 Oct 2019 04:37:13 -0400 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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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