Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4913470rwd; Sun, 11 Jun 2023 18:34:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6np7UUZsPT99nyYWukrsKEIgYXYzi+dP+jD1czIff5B6eYglkj/3jRZkPgajoN1Mj6OKnh X-Received: by 2002:a05:6a00:134f:b0:651:3e9d:2a05 with SMTP id k15-20020a056a00134f00b006513e9d2a05mr9852410pfu.19.1686533651494; Sun, 11 Jun 2023 18:34:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686533651; cv=none; d=google.com; s=arc-20160816; b=y/lVcSJnZBKg9LFYNbncQrK04LYEnFBxEpNhjZliTOzc1KkiIImg3A6YvEVz7sZ7rh w7ja3jG4UWY0Ty0u80jDK774GM3+Q/4H0rJPcHaoUM/8TSp2QddMfvcQgGmAmCl9d4RT XtcsZoKEoDIp2AwI2HVaSibVCbUsvqME6Pwj8BTWxLnbA9Puayt+jrhPKYiV2htRa2gX HzdguBiIJr1Qac8nPfMFiCOAZBc3ObDXjZzjTLOhbjCW+I99YnHdnNP0McQOp8K80XsG vjE7o0aJpnsa5cgYce1Mak3mzTyZqD7TEvBVbTaqczcs23sdYLJ0SG89e81xIJILAte6 KhPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=oinWm7F0ELK0p0hulKynsmD17K9+9ZXzoCXUbEZw2QA=; b=b+iN61musIDvO1bL03bc/A/k8pkZFn2uJx+n7EmIJKYb+/vAMZ8vgc1u4/jBqcxDal O08vU+GX+sFhEb3ouHJkTDrtsOXe422d56dMre/SM5GlppKF/qG4zlGfq6tdRxTxMv74 iMnCCRn/XtPM1EykvKnP3QwFF9Ixnz93qW5INrrDCznS2KzYqSL0EZkLVHXn/EmKIHCb MJ/6bJXSVLSPigz1ZRHJKHX8fPxPLn8jHCTgsjuftqKY/Ukj2M/woe0Y4oWdLumzHi2C OhzBi7iUaVA8NGRnb7sI6q8+ed84H50DsqSA6x8Y23pQ03NilrKXGtxMjYxmJ9uZDSCb ZoDQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e189-20020a6369c6000000b0054405fa924fsi6314359pgc.891.2023.06.11.18.33.59; Sun, 11 Jun 2023 18:34:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229604AbjFLBIu (ORCPT + 99 others); Sun, 11 Jun 2023 21:08:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229477AbjFLBIt (ORCPT ); Sun, 11 Jun 2023 21:08:49 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7E6D12D for ; Sun, 11 Jun 2023 18:08:47 -0700 (PDT) Received: from dggpemm500001.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4QfYQY1B0qzLq8l; Mon, 12 Jun 2023 09:05:41 +0800 (CST) Received: from [10.174.177.243] (10.174.177.243) by dggpemm500001.china.huawei.com (7.185.36.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Mon, 12 Jun 2023 09:08:44 +0800 Message-ID: <6a72d06d-4570-864c-ee3f-12edd9458f03@huawei.com> Date: Mon, 12 Jun 2023 09:08:44 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [PATCH] mm: kill [add|del]_page_to_lru_list() Content-Language: en-US To: Matthew Wilcox CC: Andrew Morton , , References: <20230609013901.79250-1-wangkefeng.wang@huawei.com> From: Kefeng Wang In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.177.243] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/6/10 1:18, Matthew Wilcox wrote: > On Fri, Jun 09, 2023 at 09:39:01AM +0800, Kefeng Wang wrote: >> Directly call lruvec_del_folio(), and drop unused page interfaces. > > Convert isolate_migratepages_block() to actually use folios and > then we can kill the interfaces. > >> +++ b/mm/compaction.c >> @@ -1145,7 +1145,7 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn, >> low_pfn += compound_nr(page) - 1; >> >> /* Successfully isolated */ >> - del_page_from_lru_list(page, lruvec); >> + lruvec_del_folio(lruvec, page_folio(page)); > > This kind of thing is not encouraged. It's just churn and gets in > the way of actual conversions. Sure, thanks for your suggestion, will convert isolate_migratepages_block() firstly. >