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 E8042C33CB1 for ; Wed, 15 Jan 2020 08:37:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B43EE214AF for ; Wed, 15 Jan 2020 08:37:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B43EE214AF 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 4EC288E0006; Wed, 15 Jan 2020 03:37:22 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 475708E0003; Wed, 15 Jan 2020 03:37:22 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 33D608E0006; Wed, 15 Jan 2020 03:37:22 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0033.hostedemail.com [216.40.44.33]) by kanga.kvack.org (Postfix) with ESMTP id 197F68E0003 for ; Wed, 15 Jan 2020 03:37:22 -0500 (EST) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id C2268181AEF0B for ; Wed, 15 Jan 2020 08:37:21 +0000 (UTC) X-FDA: 76379214282.09.eye62_403b3f0b5790c X-HE-Tag: eye62_403b3f0b5790c X-Filterd-Recvd-Size: 3784 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by imf50.hostedemail.com (Postfix) with ESMTP for ; Wed, 15 Jan 2020 08:37:21 +0000 (UTC) Received: by mail-wm1-f65.google.com with SMTP id m24so16826575wmc.3 for ; Wed, 15 Jan 2020 00:37:21 -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:content-transfer-encoding :in-reply-to:user-agent; bh=Fa1u1mzbBVRR4hSMwwOshanE1/Dom8+1F1uqjIUrlBM=; b=XIs5rc5rzwPO5J/NGL0+f/taBa/cMcWBM1WLa11MawRMGx6nawoOMgThRKv78bjK6X Frnjj21VwU3+yHGXJZFPU3Z/zyckS8dVHfjkVj2bOv+KOQWlTqndxnInEnx4PU7u7U1t UCWYoDagk2ufyNRdJS6filqDmv11eEETPJUFG0IjS6KN+yeivYmnyD2ZYmdvbOXe6tv4 nAXIV1L2E3nNWmURfPOLjZHFYxY9rjobgd3uxGfYo84EcsQFYgnMv/3rJ1zrFCitkl0B mEjb1ZLpTVHzV+cceolhwP4ANIM/JakyxkzysW4N9rfb4clWNNPEP/SCej/nFm0CaziS dXMQ== X-Gm-Message-State: APjAAAWeUh/T2tY+6bWtsjth7VxVv5Y3iaFlzPGDb7mjzEcJjWx9M7/R zkshoNu4wr72mKb55/k+7s8= X-Google-Smtp-Source: APXvYqxZsZXyn1rU5N3YvRWQFpcmEe3gM65E1CuC45FdUSKSvo4EJPLbmdIUa9PyShd15skfegz6fA== X-Received: by 2002:a7b:cfc2:: with SMTP id f2mr32224195wmm.44.1579077440227; Wed, 15 Jan 2020 00:37:20 -0800 (PST) Received: from localhost (prg-ext-pat.suse.com. [213.151.95.130]) by smtp.gmail.com with ESMTPSA id h17sm24267663wrs.18.2020.01.15.00.37.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jan 2020 00:37:19 -0800 (PST) Date: Wed, 15 Jan 2020 09:37:18 +0100 From: Michal Hocko To: Qian Cai Cc: David Hildenbrand , akpm@linux-foundation.org, sergey.senozhatsky.work@gmail.com, pmladek@suse.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: <20200115083718.GV19428@dhcp22.suse.cz> References: <20200114210215.GQ19428@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.2 (2019-09-21) Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.003333, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue 14-01-20 16:40:49, Qian Cai wrote: >=20 >=20 > > On Jan 14, 2020, at 4:02 PM, Michal Hocko wrote: > >=20 > > Yeah, that was a long discussion with a lot of lockdep false positive= s. > > I believe I have made it clear that the console code shouldn't depend= on > > memory allocation because that is just too fragile. If that is not > > possible for some reason then it has to be mentioned in the changelog= . > > I really do not want us to add kludges to the MM code just because of > > printk deficiencies unless that is absolutely inevitable. >=20 > I don=E2=80=99t know how to convince you, but both random number genera= tor > and printk() maintainers agreed to get ride of printk() with > zone->lock held as you can see in the approved commit mentioned in > this patch description because it is a whac-a-mole to fix other > places. I really do not understand this argument. It is quite a specific path in the console code which cannot allocate any memory or use locks which depend on the allocation via a lock chain, right? So how come this is a whack a mole? Also any console that really needs GFP_ATOMIC to write something out is just inherently broken so it should better be fixed rather than worked around. --=20 Michal Hocko SUSE Labs