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.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_2 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 7C18BC4360C for ; Thu, 10 Oct 2019 13:11:57 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3AF4021D71 for ; Thu, 10 Oct 2019 13:11:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=lca.pw header.i=@lca.pw header.b="EiIOmkCf" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3AF4021D71 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lca.pw Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D8B208E0005; Thu, 10 Oct 2019 09:11:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D3BFC8E0003; Thu, 10 Oct 2019 09:11:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C02E38E0005; Thu, 10 Oct 2019 09:11:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0086.hostedemail.com [216.40.44.86]) by kanga.kvack.org (Postfix) with ESMTP id 9A3B38E0003 for ; Thu, 10 Oct 2019 09:11:56 -0400 (EDT) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id 3E7FE180AD804 for ; Thu, 10 Oct 2019 13:11:56 +0000 (UTC) X-FDA: 76027912632.27.wrist85_10d5f76458839 X-HE-Tag: wrist85_10d5f76458839 X-Filterd-Recvd-Size: 4420 Received: from mail-qt1-f194.google.com (mail-qt1-f194.google.com [209.85.160.194]) by imf07.hostedemail.com (Postfix) with ESMTP for ; Thu, 10 Oct 2019 13:11:55 +0000 (UTC) Received: by mail-qt1-f194.google.com with SMTP id c21so8546002qtj.12 for ; Thu, 10 Oct 2019 06:11:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=Hk1hpInDwW/dNG+9po1sQg3gFwOZob0BqkXZLvXNqAM=; b=EiIOmkCf6Pz+amb0XEBVILcMqQT+nNV5dTKIqEbDB83ogxN35UhT5mKC0V3oqycGaU QfBxOW47Y9U0kt9BxV8ndtvS9n9nUsVfafK15jqq+7Sa3gLpw6rgNzFdfPua+MntFLWI IP/Lnb1cwWB/NzGxrnl2bvsxi83RAzJF1a5pTF6nlCVoR1TIWLvbpRgmhuAWLbRNpysV gqTmCjzCzYaagkD9+n1TX2aneHXcRYwZ1Iov6lHl1rNjPvy+C10PeSsxdOQNUWXFqIJ1 1Q/5hFnyB1ITV0XKbUanqtLp+nje2e0/db4cwv2oRNhFqLJM7QF72Jq/DxlqtJUZP4Wc yGlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=Hk1hpInDwW/dNG+9po1sQg3gFwOZob0BqkXZLvXNqAM=; b=iAY5F1NGr9ZBKIewJ0KilKM0qruujODgbtr47nuD5C/UWLwytdSNPqxQ5Eqe+2YlOY vTa2Bck4dZjU60Ia0BAexSCmGp8248MuQ1AwK1IovoXDm3lY0talQMSyCAi3dkGHHQag 4lwGup6CdGb90k+oLER2K5BXz79rBtB2VXRNfGBcxV3wm18276Cjur0leQV9/Ppdnp2p e/B3s1TUJrYgphG1TOMh5+bGbe3U+wrGkbxbmccVRkrbVTsPQCrZthn0oVwTnsXnnvbG 3KodcjBbeOzUky6sQoNR/D9k45otTBXTXbFXHO669rd97mAnbydUUI3SCa5bzrxDYeMs ktpw== X-Gm-Message-State: APjAAAUR51gEmO3WmiZtZv/HKfKBGTcrSDO3GmARHJt/X/P7p+XoX+Jg mWJMirNOm6tOqZq+I6hoKuB7dA== X-Google-Smtp-Source: APXvYqzvL5aeR2zrCHaTnj4XHJNQdEw7kVcRg9U8rtJXBzf4fb5WImb1YG3jeAvtErb06d3XkUhFXg== X-Received: by 2002:ac8:538b:: with SMTP id x11mr9745504qtp.216.1570713114446; Thu, 10 Oct 2019 06:11:54 -0700 (PDT) Received: from dhcp-41-57.bos.redhat.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id 139sm2577266qkf.14.2019.10.10.06.11.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Oct 2019 06:11:53 -0700 (PDT) Message-ID: <1570713112.5937.26.camel@lca.pw> Subject: Re: [PATCH v2] mm/page_isolation: fix a deadlock with printk() From: Qian Cai To: Michal Hocko Cc: Petr Mladek , 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 Date: Thu, 10 Oct 2019 09:11:52 -0400 In-Reply-To: <20191010105927.GG18412@dhcp22.suse.cz> References: <20191009162339.GI6681@dhcp22.suse.cz> <6AAB77B5-092B-43E3-9F4B-0385DE1890D9@lca.pw> <20191010105927.GG18412@dhcp22.suse.cz> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6 (3.22.6-10.el7) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.005391, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, 2019-10-10 at 12:59 +0200, Michal Hocko wrote: > On Thu 10-10-19 05:01:44, Qian Cai wrote: > >=20 > >=20 > > > On Oct 9, 2019, at 12:23 PM, Michal Hocko wrote= : > > >=20 > > > If this was only about the memory offline code then I would agree. = But > > > we are talking about any printk from the zone->lock context and tha= t is > > > a bigger deal. Besides that it is quite natural that the printk cod= e > > > should be more universal and allow to be also called from the MM > > > contexts as much as possible. If there is any really strong reason = this > > > is not possible then it should be documented at least. > >=20 > > Where is the best place to document this? I am thinking about under > > the =E2=80=9Cstruct zone=E2=80=9D definition=E2=80=99s lock field in = mmzone.h. >=20 > I am not sure TBH and I do not think we have reached the state where > this would be the only way forward. How about I revised the changelog to focus on memory offline rather than = making a rule that nobody should call printk() with zone->lock held?