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 850FAC33CB1 for ; Fri, 17 Jan 2020 14:42:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4A1172073A for ; Fri, 17 Jan 2020 14:42:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4A1172073A 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 E79506B04A5; Fri, 17 Jan 2020 09:42:12 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E29C96B04A6; Fri, 17 Jan 2020 09:42:12 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D3FD96B04A7; Fri, 17 Jan 2020 09:42:12 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0227.hostedemail.com [216.40.44.227]) by kanga.kvack.org (Postfix) with ESMTP id BFD716B04A5 for ; Fri, 17 Jan 2020 09:42:12 -0500 (EST) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id 7B3AF2C14 for ; Fri, 17 Jan 2020 14:42:12 +0000 (UTC) X-FDA: 76387391304.24.cry24_1339dbdeb7720 X-HE-Tag: cry24_1339dbdeb7720 X-Filterd-Recvd-Size: 3504 Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by imf36.hostedemail.com (Postfix) with ESMTP for ; Fri, 17 Jan 2020 14:42:11 +0000 (UTC) Received: by mail-wm1-f68.google.com with SMTP id u2so7865087wmc.3 for ; Fri, 17 Jan 2020 06:42:11 -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=l27XSLEjKU6VgUcqOxsElndg8dMBGVxtgq+CYtFeIUE=; b=mnT2W3xxiNdBtQysTwStF7xdXGD4/DWV9F3fz1E8SeVpJBnnu6orcWBadooqVjd+HE QCArm8JaDIs8PByKa/Nlt0y/xAcYMEU6JIWpj0xh9+IIGUOk660SQmgXOpv0KFpbXloB yDU9crpeBWaYFhZP1evdfCh69ar95Ixbu7SUMffMEeMmx5IVlnw37fqKUSNNHpMQNhrG WHK1UfFwWtz/8GdBrspbBv3Cv4d8atC727UA+S/DSg1WrJsdyW5LA7Ni9/LzB7a5Od78 Pqf4PiLwpiKri6Bz5b1rTMGdjUrfj5l9FMG8MaVCt/YAo+yYFIxh9juE+4CaoZgUWW7O xvpQ== X-Gm-Message-State: APjAAAWklMhvIS5cwgRlGbf4OPMoTgZjVZznaIBllU75URp1ZZUfPqSG piSQB3xDbbOAW62CvMDsKKo= X-Google-Smtp-Source: APXvYqz9INtJU0vNFZwKtzerxh/Rz1AUnLX3c27DJwAYUrHysG0T14s9u7AKy/MfBbNIxRshtMWX0w== X-Received: by 2002:a7b:cb0d:: with SMTP id u13mr5042513wmj.68.1579272131058; Fri, 17 Jan 2020 06:42:11 -0800 (PST) Received: from localhost (prg-ext-pat.suse.com. [213.151.95.130]) by smtp.gmail.com with ESMTPSA id a1sm34307416wrr.80.2020.01.17.06.42.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2020 06:42:10 -0800 (PST) Date: Fri, 17 Jan 2020 15:42:09 +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 v4] mm/hotplug: silence a lockdep splat with printk() Message-ID: <20200117144209.GA19428@dhcp22.suse.cz> References: <6BED7E12-CC3B-4AED-ACC8-F3533D3F3C70@lca.pw> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6BED7E12-CC3B-4AED-ACC8-F3533D3F3C70@lca.pw> User-Agent: Mutt/1.12.2 (2019-09-21) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000036, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri 17-01-20 07:40:15, Qian Cai wrote: > > > > On Jan 17, 2020, at 3:51 AM, David Hildenbrand wrote: > > > > -> you are accessing the pageblock without the zone lock. It could > > change to "isolate" again in the meantime if I am not wrong! > > Since we are just dumping the state for debugging, it should be fine > to accept a bit inaccuracy here due to racing. I could put a bit > comments over there. Sorry, I could have been more specific. The race I was talking about is not about accuracy. The current code is racy in that sense already because you are looking at a struct page you do not own so its state can change at any time. Please note that the zone->lock doesn't really prevent from the state transition because that applies only to free pages and those are obviously OK. So this is not really different. The race I've had in mind is a when a parallel hotplug would simply hotremove the section along with the memmap so the struct page was a complete garbage. -- Michal Hocko SUSE Labs