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=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 8ADD2C4320A for ; Thu, 29 Jul 2021 08:36:49 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2AE2A603E7 for ; Thu, 29 Jul 2021 08:36:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2AE2A603E7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=techsingularity.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id A68238D0001; Thu, 29 Jul 2021 04:36:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A18C46B005D; Thu, 29 Jul 2021 04:36:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 92E058D0001; Thu, 29 Jul 2021 04:36:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0188.hostedemail.com [216.40.44.188]) by kanga.kvack.org (Postfix) with ESMTP id 777386B0036 for ; Thu, 29 Jul 2021 04:36:48 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 2E63618411DAF for ; Thu, 29 Jul 2021 08:36:48 +0000 (UTC) X-FDA: 78414969696.19.4C1992B Received: from outbound-smtp56.blacknight.com (outbound-smtp56.blacknight.com [46.22.136.240]) by imf18.hostedemail.com (Postfix) with ESMTP id A1D1140097E5 for ; Thu, 29 Jul 2021 08:36:47 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail05.blacknight.ie [81.17.254.26]) by outbound-smtp56.blacknight.com (Postfix) with ESMTPS id 0565AFB04D for ; Thu, 29 Jul 2021 09:36:46 +0100 (IST) Received: (qmail 32396 invoked from network); 29 Jul 2021 08:36:45 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.17.255]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 29 Jul 2021 08:36:45 -0000 Date: Thu, 29 Jul 2021 09:36:44 +0100 From: Mel Gorman To: "Matthew Wilcox (Oracle)" Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Christoph Hellwig Subject: Re: [PATCH v14 049/138] mm/memcg: Add folio_lruvec_relock_irq() and folio_lruvec_relock_irqsave() Message-ID: <20210729083644.GD3809@techsingularity.net> References: <20210715033704.692967-1-willy@infradead.org> <20210715033704.692967-50-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20210715033704.692967-50-willy@infradead.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: A1D1140097E5 Authentication-Results: imf18.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf18.hostedemail.com: domain of mgorman@techsingularity.net designates 46.22.136.240 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net X-Stat-Signature: aumqpuuocbr9by7wr1ykc5auf6y4kxxq X-HE-Tag: 1627547807-97652 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Jul 15, 2021 at 04:35:35AM +0100, Matthew Wilcox (Oracle) wrote: > These are the folio equivalents of relock_page_lruvec_irq() and > folio_lruvec_relock_irqsave(). Also convert page_matches_lruvec() > to folio_matches_lruvec(). > > Signed-off-by: Matthew Wilcox (Oracle) > Reviewed-by: Christoph Hellwig When build testing what you had in your for-next branch, I got a new warning for powerpc defconfig In file included from ./include/linux/mmzone.h:8, from ./include/linux/gfp.h:6, from ./include/linux/mm.h:10, from mm/swap.c:17: mm/swap.c: In function 'release_pages': ./include/linux/spinlock.h:290:3: warning: 'flags' may be used uninitialized in this function [-Wmaybe-uninitialized] 290 | _raw_spin_unlock_irqrestore(lock, flags); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/swap.c:906:16: note: 'flags' was declared here 906 | unsigned long flags; | ^~~~~ I'm fairly sure it's a false positive and the compiler just cannot figure out that flags are only accessed when lruvec is !NULL and once lruvec is !NULL, flags are valid diff --git a/mm/swap.c b/mm/swap.c index 6f382abeccf9..96a23af8d1c7 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -903,7 +903,7 @@ void release_pages(struct page **pages, int nr) int i; LIST_HEAD(pages_to_free); struct lruvec *lruvec = NULL; - unsigned long flags; + unsigned long flags = 0; unsigned int lock_batch; for (i = 0; i < nr; i++) {