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 E75C4C33CB1 for ; Fri, 17 Jan 2020 15:26:35 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B0F792073A for ; Fri, 17 Jan 2020 15:26:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B0F792073A 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 4BBD06B04B3; Fri, 17 Jan 2020 10:26:35 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 44D4F6B04B4; Fri, 17 Jan 2020 10:26:35 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 30CB96B04B5; Fri, 17 Jan 2020 10:26:35 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0240.hostedemail.com [216.40.44.240]) by kanga.kvack.org (Postfix) with ESMTP id 17EE96B04B3 for ; Fri, 17 Jan 2020 10:26:35 -0500 (EST) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id 990BD824805A for ; Fri, 17 Jan 2020 15:26:34 +0000 (UTC) X-FDA: 76387503108.12.page93_7393f2bb5eb5c X-HE-Tag: page93_7393f2bb5eb5c X-Filterd-Recvd-Size: 3865 Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by imf27.hostedemail.com (Postfix) with ESMTP for ; Fri, 17 Jan 2020 15:26:34 +0000 (UTC) Received: by mail-wm1-f68.google.com with SMTP id p17so8058347wma.1 for ; Fri, 17 Jan 2020 07:26:34 -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=Qe3ZG5qGs4Za1UL46G9mvWf8aglJRGD1g1vzKoFejpMnZd/XkDhDM6uhqyKevHAl0R GRSoRect0v9/vTHOjEfhwtZPvfdMJWWRvCmpPN6JPZ+OSYsCCvJBKA9irnlP4z2e6Y+N POsRdxvVxkfReJ9e5A25yLaiEGVr0kDa6nE2a1YSO9Z78FkRSpWVcZPkISlRzI2iLTHC EAkt2MrfGIdAULouvcpWFgqke0/xeryr++KsnzMKHvHe2yWfEO9xQIPNURQ35EGgtgj0 nzIwbixfRR37AF1ALg5kzhzlR8GrIgkqT1TDAXnQqCx5Xj3cFqVCnvWpOC+2Fud+sf25 /naQ== X-Gm-Message-State: APjAAAWCb38/BWauB2EXiWFMOnsbdPl4Bqob+z37JQ0j48d0Mw/BAfff FvWEskkezD0QQvdPR9MVnrY= X-Google-Smtp-Source: APXvYqzmut3AbdodMKbldK91Sl/6ZksklT1nZbYZzRgc6raJH+ZG1nmNAZsmhjHD7gtmDf+4IZDX7A== 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) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000128, 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 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