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 42A79C33CAF for ; Thu, 16 Jan 2020 17:43:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 15B5424743 for ; Thu, 16 Jan 2020 17:43:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 15B5424743 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 A8A818E008B; Thu, 16 Jan 2020 12:43:37 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A39D28E0089; Thu, 16 Jan 2020 12:43:37 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 94FB28E008B; Thu, 16 Jan 2020 12:43:37 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0191.hostedemail.com [216.40.44.191]) by kanga.kvack.org (Postfix) with ESMTP id 7F2AB8E0089 for ; Thu, 16 Jan 2020 12:43:37 -0500 (EST) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id 3BD682481 for ; Thu, 16 Jan 2020 17:43:37 +0000 (UTC) X-FDA: 76384219674.13.burst83_59a4506ffea62 X-HE-Tag: burst83_59a4506ffea62 X-Filterd-Recvd-Size: 5333 Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by imf17.hostedemail.com (Postfix) with ESMTP for ; Thu, 16 Jan 2020 17:43:35 +0000 (UTC) Received: by mail-wm1-f66.google.com with SMTP id d139so7682777wmd.0 for ; Thu, 16 Jan 2020 09:43:35 -0800 (PST) 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=9MY7ONfav8khW1lJ/3uShsqH56KYxPDNgzIDEH/X/z0=; b=HnqsN8IdzBIpaNXs8MsilLwaoHTpVPArQ6+9inzJ6e85ocS7m5nWkPEtQlEO3jIlto lVOBtPWZxP5WromCgIxu89RqsxyVmV+p1iyPYDFNyNW4vFNOkPxs1Wi9o/2Ko840NCcS 3zQde5tN2hQKQ3ZNPd9LzI/30R6DHYVs5lvA1OZPECoy972Ozz40D4pFwe7gvPXxpHWu 3QnlF12sfptN+0Iuwsr3GLf+o2jZ+h6Q1wjs2KRe1tortBx1YL12wyXff0LnIKIyRjoy G6ByuZPZ/GHl0xm27466XH/q53Ii0uWSqbbjeHZeh22b48JiUWhFjtimbg9eYviYluRU Ne3Q== X-Gm-Message-State: APjAAAVBNQQDW02RbQ7rX7Cll6fIvEY49Dql1ew+Lsdl0AD1e+/HoJNn Wdq2ZL3O0Xtnc4jauaa+y18= X-Google-Smtp-Source: APXvYqxbr0QGqGVKoGE7VIJlOoZQRh4NxgUUDikKHVS27nzBAhKrFqcfAbnbG11fYe09SRvzzyVLmA== X-Received: by 2002:a05:600c:141:: with SMTP id w1mr166948wmm.61.1579196614741; Thu, 16 Jan 2020 09:43:34 -0800 (PST) Received: from localhost (ip-37-188-146-105.eurotel.cz. [37.188.146.105]) by smtp.gmail.com with ESMTPSA id i11sm30995465wrs.10.2020.01.16.09.43.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2020 09:43:33 -0800 (PST) Date: Thu, 16 Jan 2020 18:43:31 +0100 From: Michal Hocko To: Qian Cai Cc: Andrew Morton , Sergey Senozhatsky , pmladek@suse.com, rostedt@goodmis.org, peterz@infradead.org, david@redhat.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next v3] mm/hotplug: silence a lockdep splat with printk() Message-ID: <20200116174331.GC19428@dhcp22.suse.cz> References: <20200115172916.16277-1-cai@lca.pw> <20200116142827.GU19428@dhcp22.suse.cz> <162DFB9F-247F-4DCA-9B69-535B9D714FBB@lca.pw> <20200116155434.GB19428@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.2 (2019-09-21) 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 16-01-20 11:05:07, Qian Cai wrote: > > > > On Jan 16, 2020, at 10:54 AM, Michal Hocko wrote: > > > > On Thu 16-01-20 09:53:13, Qian Cai wrote: > >> > >> > >>> On Jan 16, 2020, at 9:28 AM, Michal Hocko wrote: > >>> > >>> On Wed 15-01-20 12:29:16, Qian Cai wrote: > >>>> It is guaranteed to trigger a lockdep splat if calling printk() with > >>>> zone->lock held because there are many places (tty, console drivers, > >>>> debugobjects etc) would allocate some memory with another lock > >>>> held which is proved to be difficult to fix them all. > >>> > >>> I am still not happy with the above much. What would say about something > >>> like below instead? > >>> " > >>> It is not that hard to trigger lockdep splats by calling printk from > >>> under zone->lock. Most of them are false positives caused by lock chains > >>> introduced early in the boot process and they do not cause any real > >>> problems. There are some console drivers which do allocate from the > >>> printk context as well and those should be fixed. In any case false > >>> positives are not that trivial to workaround and it is far from optimal > >>> to lose lockdep functionality for something that is a non-issue. > >>> > >>> " > >> > >> I feel like I repeated myself too many times. A call trace for one lock dependency > >> is sometimes from early boot process because lockdep will save the first one it > >> encountered, but it does not mean the lock dependency will only not happen in > >> early boot. I spent some time to study those early boot call traces in the given > >> lockdep splats, and it looks to me the lock dependency is also possible after > >> the boot. > > > > Then state it explicitly with an example of the trace and explanation > > that the deadlock is real. If the deadlock is real then it shouldn't be > > really terribly hard to notice even without lockdep splats which get > > disabled after the first false positive, right? > > A deadlock could be really hard to trigger though which needs a perfect > timing between multiple threads. All I am saying is: Do not speculate in changelog. Make clear arguments. So far we have seen many false positives and that is stated in the wording I have suggested. It is also explained why those suck. There is also a note that _some_ consoles might indeed deadlock. Compare that to the original changelog which doesn't really saying anything useful about those lockdep splats. I obviously do not insist on my wording but please make the changelog clear on the actual problem and stick to facts. Thanks! -- Michal Hocko SUSE Labs