Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp818994ybp; Wed, 9 Oct 2019 04:51:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqy0/XXg4kSvJSynUze3N5+K5TsUX/MXbVU/dVGUhx+9b3j+GhaYEWImMpeBIkQBEnX7oLbl X-Received: by 2002:a17:906:5502:: with SMTP id r2mr2401345ejp.3.1570621913711; Wed, 09 Oct 2019 04:51:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570621913; cv=none; d=google.com; s=arc-20160816; b=X8fPuDe7Q/tdunfY6wA9Gzb156oS2utSbsl6Yftm1MVT7W0364fCtwji1r35qE4EYf DBiDokMIVeuu9lu815Rbl2agR0OU7cPfER3nz89HTRqz3xJ1txRMfZAVC1qAABW3HynS H0IYduib2Mbwfg0QsXVApIhMrcNNX50FEKvX8zk4nzshUjbkbjDuuH9afR7UemVbtcHi Q9jYBO10Q4AcwIIKapWKquuyXsxBKAbyPUH96xLz+7WzOscWkJLOGIIbjbpEcep/RPDu usRCx0P7XOOc4kUZwcUwSQuElScf141I9fJI/qIXGnrVYSzZeg4dluaHvh3qOl9Fk1/2 9DIw== 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=uJMoJ0Z3o+1tXiq/kVFISvmz+lEdgwFJ5GTNQihjozU=; b=POEIZSOK+rMzrGeypbXPNzpq2hp4yuws9tcRrAXaOrf7Zz3U4bYh0IF+AuVgsm0jx+ ND84CkEKbKkgTxsozOF+1adqt/teuiwYgRGDrysqY/+UwjdqcFhM9rqwnUU2RbNQaLHN gcRujzws0M1JNlg8wUuk2I8k5nwiFBY2DGRO3U8Gl0yNFWsQaB+uLvwdEj7Ib8qbWxgr Ytt3yx/P5hmjb6DDiqweeyWk93OHtlHfElVNBACQMy9eS0l3sP38I54Nd3eQnd7JbmrE 4gloKOwkX9VE3r0u2NYMvA9WJqGVMAvo5jAUq3uDFa17gSDI5g3zqdLKf6w7FXRPiO6Y W1yw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c9si1184491eda.229.2019.10.09.04.51.30; Wed, 09 Oct 2019 04:51:53 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730994AbfJILtF (ORCPT + 99 others); Wed, 9 Oct 2019 07:49:05 -0400 Received: from mx2.suse.de ([195.135.220.15]:47548 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728054AbfJILtF (ORCPT ); Wed, 9 Oct 2019 07:49:05 -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 B5CF7B117; Wed, 9 Oct 2019 11:49:03 +0000 (UTC) Date: Wed, 9 Oct 2019 13:49:03 +0200 From: Petr Mladek To: Qian Cai Cc: Michal Hocko , Christian Borntraeger , Heiko Carstens , sergey.senozhatsky.work@gmail.com, rostedt@goodmis.org, peterz@infradead.org, linux-mm@kvack.org, john.ogness@linutronix.de, akpm@linux-foundation.org, Vasily Gorbik , Peter Oberparleiter , david@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] mm/page_isolation: fix a deadlock with printk() Message-ID: <20191009114903.aa6j6sa56z2cssom@pathway.suse.cz> References: <20191007143002.l37bt2lzqtnqjqxu@pathway.suse.cz> <20191007144937.GO2381@dhcp22.suse.cz> <20191008074357.f33f6pbs4cw5majk@pathway.suse.cz> <20191008082752.GB6681@dhcp22.suse.cz> <1570550917.5576.303.camel@lca.pw> <20191008183525.GQ6681@dhcp22.suse.cz> <1570561573.5576.307.camel@lca.pw> <20191008191728.GS6681@dhcp22.suse.cz> <1570563324.5576.309.camel@lca.pw> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1570563324.5576.309.camel@lca.pw> User-Agent: NeoMutt/20170912 (1.9.0) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 2019-10-08 15:35:24, Qian Cai wrote: > On Tue, 2019-10-08 at 21:17 +0200, Michal Hocko wrote: > > On Tue 08-10-19 15:06:13, Qian Cai wrote: > > > On Tue, 2019-10-08 at 20:35 +0200, Michal Hocko wrote: > > > > [...] > > > > I fully agree that this class of lockdep splats are annoying especially > > > > when they make the lockdep unusable but please discuss this with lockdep > > > > maintainers and try to find some solution rather than go and try to > > > > workaround the problem all over the place. If there are places that > > > > would result in a cleaner code then go for it but please do not make the > > > > code worse just because of a non existent problem flagged by a false > > > > positive. > > > > > > It makes me wonder what make you think it is a false positive for sure. > > > > Because this is an early init code? Because if it were a real deadlock > > No, that alone does not prove it is a false positive. There are many places > could generate that lock dependency but lockdep will always save the earliest > one. You are still mixing the pasted lockdep report and other situations that will not get reported because of the first one. We believe that the pasted report is pasted is false positive. And we are against complicating the code just to avoid this false positive. Are you sure that the workaround will not create real deadlocks or races? I see two realistic possibilities: + Make printk() always deferred. This will hopefully happen soon. + Improve lockdep so that false positives could get ignored without complicating the code. Best Regards, Petr