Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp9123716ybl; Fri, 17 Jan 2020 06:44:43 -0800 (PST) X-Google-Smtp-Source: APXvYqzAuwuLK03kTSXEI71OHyGiTsjfbXLbn+Ps3dWzGbQxJn1dEICbD0g4ievDbczkqzeJ2LKY X-Received: by 2002:a9d:3b09:: with SMTP id z9mr6379106otb.195.1579272282951; Fri, 17 Jan 2020 06:44:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579272282; cv=none; d=google.com; s=arc-20160816; b=e9o1YLVNajCUvihqU3GmzzWL0Pj6ocgLI1A1W/slyG7ejUys5TszyDQgqn1Rkql2Ef SJI9JhorcgUct8WQJV0SNof1ItGHnIXg6otn2vmF7KSSTQffCHk5NkilAgk5fts3JDXM OYL088GHx+HKtIn9+ZwLt4/zbhJT9dZL6XXuHdIYh+TJL8363mblNA13lrMByudLzCHa FA9HkHh7ufG9QTWDUrXaXdwYVfRwzY5yBF3fBSDfpPTzGA7VA9i/+SOln/LaD/CtoLN6 0BLraYwUxNugyP2jVm0q0VZxe3q1l8V61Yqk2c5Ig7jdmiGlHjiz6sHz8QfhrAsYN0g1 64vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=l27XSLEjKU6VgUcqOxsElndg8dMBGVxtgq+CYtFeIUE=; b=Ccg9mkuFjDtp2/7IGCgGs3sEtHHUA9F7ERewsI0nuxfQm9oH3qM0C2mFLS1rvUEpGp WH2K8UcagrylQHs5DrP2mjC2WtpL8vM+Xd6LiM/e5Lsyc14GwMtJPuVxjr2XHmNvmz81 bJwN+yuoysbmMjwIH0AHe0b5rME11XwaorP/w5zgXm5OqNG9kspMVe/2kVGtqKI3fV+E rHqISbwfEM+YIR0YoZCZ3rSIF6Ovrq8saeJLIm34jGWVUcfw2V8W8+8H56ctYP7t5+FX BTKlXwGTtM2iWMzXp1I8ygtJwSeeiAg+Wn/EIuXDzC3cXcBj9Ch1m1IOYaUI+f7G/Y9P CI9g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a128si12991757oib.142.2020.01.17.06.44.29; Fri, 17 Jan 2020 06:44:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728775AbgAQOmN (ORCPT + 99 others); Fri, 17 Jan 2020 09:42:13 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:55179 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726951AbgAQOmM (ORCPT ); Fri, 17 Jan 2020 09:42:12 -0500 Received: by mail-wm1-f65.google.com with SMTP id b19so7662881wmj.4 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=bWvYjIhEw5xy4EOQNaVZ2aDDwjypGGUNtC1FjVwGPwgPakNHLdj7F8OJv4jYg0ATGr me04FZIPj9PfCAV00RndbbmFoW5UKguRbHCZDRuwSr2pYf610pxu3a/Un/exCWDNSpFP rk+cseu+Gi5G0bw89J/vwtSqAt35J7DvmPPdRYpi/FjBDA1P4wi0WQS/vHVTpEoX1VfT zQvjxJV9BTEIYH2u2hBRhH3oOkP0cZjlQMGFHbcwGWg0jdjafAuqBjc58kDR/fPeJCnM RQCwje/o7hHaTWMZBWpDMoPUMbVCxJAq/tRmU65g7DMsnRrSWE6OshxAIClkHTlqqd+G AsYw== X-Gm-Message-State: APjAAAXn1tP+/ryeSCD+Gi0j7VzYuQjoRneokqXp7OLiB7rsUpzat//l mgoVLimY9FKJsiC8xMw2Lrk= 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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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