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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6565CC38142 for ; Wed, 1 Feb 2023 09:08:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=eQ2gtm3LWSJrIbtVdCk+L3W0105yoVeJeApYPeHCbTQ=; b=GiRjJA4RLcHb4T MV/nVH9mtgfjQvWtbrdHVunf/VMkiF73BZj6BKRQpjE1znugIQ5BHjSMRm9oexw0Ew7t8mPHCEtj/ yLmAazNUgSfIhbaJWABMS9sXW48p8i+M/OdvkE+WhSWVPpK9UKcd4PisdOcZ8IeZKUAjKphXXA1EO praPbSxBwsQLFWJHfJ8Am6kK1dmU0MZU7taOuavyQ7zPhbdb5RInY5N0ZRLN1skGLQ0KWGOKICzxl Ebx17WzKb4LMOPTr5lQ1AVORgHQZ30DeCmtAGf5PXgw4VD70+zQXrEKhwG0ZYT4EvVxn9mTSZNNBx uZ0klZ4dFoQBvCPgULog==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pN95k-00Aw7K-0H; Wed, 01 Feb 2023 09:07:44 +0000 Received: from out30-110.freemail.mail.aliyun.com ([115.124.30.110]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pN95g-00Avz9-83; Wed, 01 Feb 2023 09:07:41 +0000 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R481e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045176;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0Vag58Zn_1675242449; Received: from 30.97.48.53(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0Vag58Zn_1675242449) by smtp.aliyun-inc.com; Wed, 01 Feb 2023 17:07:30 +0800 Message-ID: Date: Wed, 1 Feb 2023 17:08:06 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH] mm/gup: Add folio to list when folio_isolate_lru() succeed To: Kuan-Ying Lee , Andrew Morton , Matthias Brugger , Alistair Popple , John Hubbard Cc: chinwen.chang@mediatek.com, andrew.yang@mediatek.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org References: <20230131063206.28820-1-Kuan-Ying.Lee@mediatek.com> From: Baolin Wang In-Reply-To: <20230131063206.28820-1-Kuan-Ying.Lee@mediatek.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230201_010740_503937_76FB8D4E X-CRM114-Status: GOOD ( 13.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 1/31/2023 2:32 PM, Kuan-Ying Lee wrote: > If we call folio_isolate_lru() successfully, we will get > return value 0. We need to add this folio to the > movable_pages_list. > > Fixes: 67e139b02d99 ("mm/gup.c: refactor check_and_migrate_movable_pages()") > Signed-off-by: Kuan-Ying Lee Good catch. Reviewed-by: Baolin Wang > --- > mm/gup.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/gup.c b/mm/gup.c > index f3d2cccb89f8..918c364d01ac 100644 > --- a/mm/gup.c > +++ b/mm/gup.c > @@ -1914,7 +1914,7 @@ static unsigned long collect_longterm_unpinnable_pages( > drain_allow = false; > } > > - if (!folio_isolate_lru(folio)) > + if (folio_isolate_lru(folio)) > continue; > > list_add_tail(&folio->lru, movable_page_list); _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel