Received: by 2002:a05:6a10:144:0:0:0:0 with SMTP id 4csp1304938pxw; Sat, 9 Apr 2022 19:24:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwk2QGUjoJNeruEd98D2wcml7Vt7HuK8+bkcKv3TWbR0ZrmmZqtI2wOuSh6a5NdRQKx0lp X-Received: by 2002:aa7:df15:0:b0:41d:675f:ea9a with SMTP id c21-20020aa7df15000000b0041d675fea9amr6574500edy.148.1649557496070; Sat, 09 Apr 2022 19:24:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649557496; cv=none; d=google.com; s=arc-20160816; b=PheQFNhUVqh6VMzcruwx2an1u0RdalBmp19pILTTBW7dVkxAANb3N4OhL5zcK/wJme 9utPhs3ogTEPUbStqgijuGj51s3DP1i5ZheH3Vzs3Wcy1kTadBfrEi+Wk6lJgFlJ6uoS 1RgSsORwfTErWOGyThpseFMBdOvjtzfHTiNOsC33ATbxmtAvDgVgawTARioeXtrr0Rhl MgfErpKi6lRgWhsS4mcBUAQ951R/2m8SIGCKGfF2AEOqGVKVkUIzJx75mGC/uDhMFVt9 Njw0tuIxxg+bbVxxSjaAX3I8FF1gAzg0FSyN82p+cmMBcbFQm8+QJlyOK4JlGRR+HzVq RcXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=OCMFIkX1f+gXU00Lt+0pr/SW/7IDo+CZSW65CYZ05pg=; b=Juw0raR/e4fSpHwPzUptRM7TOv0syoDSKqD28UbYikspTZbXhN/EfAj+dmD6jdbkNZ odicQRK4nGaBNAckw3D4gPE3XeZ4XqJrohpA98faJ0xpKf4QiUziwJF4Lejw2jpbwSFK fuGDI32C112Xony+DoBcRjvSXFyr2WRAEWlnWyuNvl0kcQRKUbDglBNFumx0LmLq2RG4 iFyaelkqjmIdVU48MnyPpW0RmUAxqOpJAaR/vKUo+BYzLnU21rQcCJ/ufi7e/A3MoQ9K bTjIwh0NWmvnjJFlDS2QV0uGuDPYQwXd+6w0gAaWKwPF0nBJ8pu2idbi1lgepcOSonRh +lig== 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 i6-20020a170906090600b006e7877b5c9esi3976102ejd.833.2022.04.09.19.24.31; Sat, 09 Apr 2022 19:24:56 -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 S241236AbiDIJgm (ORCPT + 99 others); Sat, 9 Apr 2022 05:36:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237881AbiDIJgh (ORCPT ); Sat, 9 Apr 2022 05:36:37 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF1603B290 for ; Sat, 9 Apr 2022 02:34:30 -0700 (PDT) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Kb8zZ66MCzgYNC; Sat, 9 Apr 2022 17:32:42 +0800 (CST) Received: from huawei.com (10.175.124.27) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Sat, 9 Apr 2022 17:34:28 +0800 From: Miaohe Lin To: CC: , , , , , , Subject: [PATCH v2 0/9] A few cleanup and fixup patches for vmscan Date: Sat, 9 Apr 2022 17:34:51 +0800 Message-ID: <20220409093500.10329-1-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,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 Hi everyone, This series contains a few patches to remove obsolete comment, introduce helper to remove duplicated code and so no. Also we take all base pages of THP into account in rare race condition. More details can be found in the respective changelogs. Thanks! --- v2: patch 1/9: drop code change and add a comment about MADV_FREE patch 2/9: simplify the code further and change to goto keep_locked patch 3/9: use folio, remove unneeded inline and break craze long lines patch 5/9: activate swap-backed executable folios after first usage too patch 9/9: new cleanup patch splitted from 5/9 Many thanks Huang Ying, Matthew Wilcox, Christoph Hellwig, Muchun Song for review! --- Miaohe Lin (9): mm/vmscan: add a comment about MADV_FREE pages check in folio_check_dirty_writeback mm/vmscan: remove unneeded can_split_huge_page check mm/vmscan: introduce helper function reclaim_page_list() mm/vmscan: save a bit of stack space in shrink_lruvec mm/vmscan: activate swap-backed executable folios after first usage mm/vmscan: take all base pages of THP into account when race with speculative reference mm/vmscan: take min_slab_pages into account when try to call shrink_node mm/vmscan: remove obsolete comment in kswapd_run mm/vmscan: use helper folio_is_file_lru() mm/vmscan.c | 92 ++++++++++++++++++++++++++--------------------------- 1 file changed, 45 insertions(+), 47 deletions(-) -- 2.23.0