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.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, 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 5749FC33CB3 for ; Wed, 15 Jan 2020 17:02:40 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0A011214AF for ; Wed, 15 Jan 2020 17:02:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0A011214AF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 594878E0006; Wed, 15 Jan 2020 12:02:39 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 541868E0005; Wed, 15 Jan 2020 12:02:39 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 40B028E0006; Wed, 15 Jan 2020 12:02:39 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0044.hostedemail.com [216.40.44.44]) by kanga.kvack.org (Postfix) with ESMTP id 2C3AF8E0005 for ; Wed, 15 Jan 2020 12:02:39 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id D13ED180AD817 for ; Wed, 15 Jan 2020 17:02:38 +0000 (UTC) X-FDA: 76380487596.14.fall35_6e61852974052 X-HE-Tag: fall35_6e61852974052 X-Filterd-Recvd-Size: 2784 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf25.hostedemail.com (Postfix) with ESMTP for ; Wed, 15 Jan 2020 17:02:38 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 2A7D9ADCF; Wed, 15 Jan 2020 17:02:36 +0000 (UTC) Date: Wed, 15 Jan 2020 18:02:35 +0100 From: Petr Mladek To: Qian Cai Cc: Michal Hocko , David Hildenbrand , akpm@linux-foundation.org, sergey.senozhatsky.work@gmail.com, rostedt@goodmis.org, peterz@infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next] mm/hotplug: silence a lockdep splat with printk() Message-ID: <20200115170235.ph7lrojaktmfikm2@pathway.suse.cz> References:<20200115095253.36e5iqn77n4exj3s@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170912 (1.9.0) Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000003, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed 2020-01-15 06:49:03, Qian Cai wrote: >=20 >=20 > > On Jan 15, 2020, at 4:52 AM, Petr Mladek wrote: > >=20 > > I could understand that Michal is against hack in -mm code that > > would just hide a false positive warning. >=20 > Well, I don=E2=80=99t have any confidence to say everything this patch = is > trying to fix is false positives. You look at this from a wrong angle. AFAIK, all lockdep reports pasted in the below mentioned thread were false positives. Now, this patch complicates an already complicated -mm code to hide the warning and fix theoretical problems. I suggest to disable lockdep around the safe allocation in the console initialization code. Then we will see if there are other locations that trigger this lockdep warning. It is trivial and will not complicate the code because of false positives. > I have been spent the last a few months to research this, so > I don=E2=80=99t feel like to do this again. >=20 > https://lore.kernel.org/linux-mm/1570633715.5937.10.camel@lca.pw/ Have you tried to disable lockdep around the problematic allocation? Have you seen other lockdep reports caused by exactly this printk() in the allocator code? My big problem with this patch is that the commit message does not contain any lockdep report. It will complicate removing the hack when it is not longer needed. Nobody will know what was the exact problem and if it is safe to get removed. I believe that printk() will offload console handling rather sooner than later and this extra logic will not be necessary. Best Regards, Petr