Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp9172055ybl; Fri, 17 Jan 2020 07:28:55 -0800 (PST) X-Google-Smtp-Source: APXvYqzZJSR6/iY4wz9u855ce0veYb7zYHIDQ+lhu0rRcPmHRTNFaujZ0llmnlTSpMP7oqetyGDD X-Received: by 2002:a05:6830:1e67:: with SMTP id m7mr6570171otr.262.1579274935836; Fri, 17 Jan 2020 07:28:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579274935; cv=none; d=google.com; s=arc-20160816; b=ZU64VA8Ci/WRKgJD/XR2llDIuppWHzT3borjVh/DcMiwFQrBiF9WGMWaH8CL55i0hZ ym649Q4wy7eOsRXypCgcYxLjwteZpbatAXkTbKEhz+Krl/C4NDHA1pCXd9MsQOQWP3/8 Cn467eBvOsipARFo4FXJ7ya9x8jvJpK4oZsgQyxfS8Fhap6y2ZJgQRVKCX8YHWKKIBGm URAaRwooYhHKlj4jNmmR6epBv6Es3OdWpkbVLHHumoqzZ/CW7ADnRBp/UlrqEKvS50OB HgQBvdXCl0k+pgQxOTOipYQfxygNh5qnsf2iSID9IEk6L4ZOREvPcDl3JDHG+F4V8Cjl Ml2w== 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=54lYfq6O2/zCWOuTXiiiKBsbz1wekZ0hwyTR+nI95t4=; b=aWxl2ImlNpNVno0KlSS4T7klFwWPK5OBTOLJaix7S3NdFr7TgbGQsziGm+WYFe2oit BnPQyls3RdH+XjQsaGBNGSAaskzgvVSM2t2OwXHAcfp5hgh8j20T/Zn2Dv2M6tfliKRh ZRnIj1rS7NaFIFoiDp74ZVdmZvYrPuJ6pdyepFhHV/kld29FPTqYgnK1SQiD1yYyepZN KUgHp9MNmegsbVNcqLAySKJUuayxyf/KGykExBVG6BnbTEM6nZzs7PSVlyp8TuOX0X6Z YO2SYgIppDbZsr0T3TI8iAb0gRWBhlRaKeJdYMQS035sREDSc9mz4406Gw8cJYYuPddb 185Q== 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 t21si15357142oth.274.2020.01.17.07.28.44; Fri, 17 Jan 2020 07:28:55 -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 S1729016AbgAQP0f (ORCPT + 99 others); Fri, 17 Jan 2020 10:26:35 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:38153 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726942AbgAQP0f (ORCPT ); Fri, 17 Jan 2020 10:26:35 -0500 Received: by mail-wm1-f66.google.com with SMTP id u2so8019657wmc.3 for ; Fri, 17 Jan 2020 07:26:33 -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=54lYfq6O2/zCWOuTXiiiKBsbz1wekZ0hwyTR+nI95t4=; b=Dy8Wrbv/nKMxPj1s5A5JZLA//cgcQa27XzKQHHPlaVcn8Qb7Cmf3Ez3fZkrLTpf0Up hZ3938ZI5/dMDyY/2WpVjxvK779FUB39HF08yJFMY1IwaoI8iQDZWdHEd7FSG72COXWo FXHXbNUQ5hgRvZRrSw3OOpB2KOea+NKRppSPHgk0dWKSgUzlsljf9oOD0Ur8Xdymaxby XBgbg//vjaAdpap6oSioePWTc+As1vU4PhdVetAnxqLDhhYscOBkhjObyFSN3jG/5KXP s2jGIs2CQrrLSgwQ3vOlJGQzYdLwun5PTew2rtMhhfwqXJN2kL6f6pUHbcupdTQrFHI+ UquA== X-Gm-Message-State: APjAAAWs1rw9CsTF2FUud8aLjMovbv76LNSkTrTR/YBHnvMbiP7Ou1sg wmaNlaj+fVeOp9ytK3jpToE= X-Received: by 2002:a1c:6588:: with SMTP id z130mr5129791wmb.0.1579274793248; Fri, 17 Jan 2020 07:26:33 -0800 (PST) Received: from localhost (prg-ext-pat.suse.com. [213.151.95.130]) by smtp.gmail.com with ESMTPSA id n3sm32566714wrs.8.2020.01.17.07.26.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2020 07:26:32 -0800 (PST) Date: Fri, 17 Jan 2020 16:26:31 +0100 From: Michal Hocko To: David Hildenbrand Cc: Qian Cai , 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: <20200117152631.GJ19428@dhcp22.suse.cz> References: <6BED7E12-CC3B-4AED-ACC8-F3533D3F3C70@lca.pw> <20200117144209.GA19428@dhcp22.suse.cz> <0e9b9357-1982-edd3-dbfe-5350c8d6d0eb@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0e9b9357-1982-edd3-dbfe-5350c8d6d0eb@redhat.com> 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 15:43:58, David Hildenbrand wrote: > On 17.01.20 15:42, Michal Hocko wrote: > > 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 > > The pageblock state cannot change with the zone->lock. That's what I was > referring to here. (this specific check) CMA pages tend to have a stable pageblock state. More importantly this is not the most important information from my experience. It is usually reference count and page flags that are of interest. Or details about what kind of filesystem is owning the page and it doesn't want to release it. -- Michal Hocko SUSE Labs