Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5922305pxv; Thu, 29 Jul 2021 01:38:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOggyu/3TO8pRg98hpsmzgALdcGh+GiYzyLh/yPbdgnca8fOJW3poXbFDNCKJwcTfVNQMK X-Received: by 2002:a6b:3bc3:: with SMTP id i186mr3212851ioa.64.1627547884289; Thu, 29 Jul 2021 01:38:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627547884; cv=none; d=google.com; s=arc-20160816; b=0skrlJ3iBbG09Fj0SznUCWBeDAI4wpnqjnWlVkRDvmEH4yWJXTd38NMhrOu/JsCr1B M/+C4egnArbt4qOvSmvUFZ5LQl3ghN0dff8yBcHb2PU+WTLyxTVh+Iv59uQimsUIe+Ro 3ZZ9YVLImCVJ9EtcLOU8t8XHwrOzEMrHCqBZIKZU1am6Al6yBxe8zRg2pLgcydQRgiOy G0aaH2Sy5GCUcxvvWvbDwxF/jd96hKdI/hvgzfb+yNlikELi/B1+XkKHh09KuZKIJMd0 R5l1AXXxKyvM+wlgjcihqpDiVxraUgRb4yGDzv9RpTJrSWRsQz8rFluzMUHdP9pLYb5T Lxug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=KcM4FffwegJTiPbEJ+boqIG3BDPQyYouxH1iht2/mhE=; b=MjerurW/uMtW2j40/d59Qu+z/yFNH3RHkl3Z3T7Qo2gBLTyHgxKj10v53WvhXS+Bbl 4B4ByIYB9CrkR5VAxbJI34sBN0AqByDGIqaYChbjCGuDvmet+t94ksOwx0HpUXoJmZO/ 4PUs4KrFS5OBKEDa/RvllFgMFUelTxST/LVb67922jAkRj9LcF4IZWR0KYbtaJ5dhX9Z 8UkZ4bhFZcojXUcJG0nO4NYWg92AxL0tbdJhAIFrFtZi1mnccrLYRmbnXSXROCOHBcx4 c/LAJP9oV5TLuc6O+AIurcJ/ZtnYzmSPYreiNbMRxQv53DDBVekC/8CQ7cNX5M6esBHu UAfA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y1si2654914jap.90.2021.07.29.01.37.52; Thu, 29 Jul 2021 01:38:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234942AbhG2Igu (ORCPT + 99 others); Thu, 29 Jul 2021 04:36:50 -0400 Received: from outbound-smtp25.blacknight.com ([81.17.249.193]:52316 "EHLO outbound-smtp25.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234886AbhG2Igt (ORCPT ); Thu, 29 Jul 2021 04:36:49 -0400 Received: from mail.blacknight.com (pemlinmail05.blacknight.ie [81.17.254.26]) by outbound-smtp25.blacknight.com (Postfix) with ESMTPS id EE591CAED6 for ; Thu, 29 Jul 2021 09:36:45 +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) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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++) {