From patchwork Mon Apr 25 11:12:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 12825591 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5502BC433F5 for ; Mon, 25 Apr 2022 11:12:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5152A6B0074; Mon, 25 Apr 2022 07:12:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4C46A6B0075; Mon, 25 Apr 2022 07:12:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3B3AF6B0078; Mon, 25 Apr 2022 07:12:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id 2BA476B0074 for ; Mon, 25 Apr 2022 07:12:13 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id F06B422E46 for ; Mon, 25 Apr 2022 11:12:12 +0000 (UTC) X-FDA: 79395137304.28.66A53D6 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf05.hostedemail.com (Postfix) with ESMTP id 4397610003C for ; Mon, 25 Apr 2022 11:12:06 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Kn2Qd3VjxzhYlG; Mon, 25 Apr 2022 19:11:53 +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; Mon, 25 Apr 2022 19:12:08 +0800 From: Miaohe Lin To: CC: , , , , , , Subject: [PATCH v3 0/6] A few cleanup and fixup patches for vmscan Date: Mon, 25 Apr 2022 19:12:26 +0800 Message-ID: <20220425111232.23182-1-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 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-Stat-Signature: cw5zzs3nwep5y6zc8ujs4iqp4qps3hid X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 4397610003C X-Rspam-User: Authentication-Results: imf05.hostedemail.com; dkim=none; spf=pass (imf05.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com X-HE-Tag: 1650885126-920969 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: 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! --- v3: patch 1/9: collect Reviewed-by tag and add a period in the comment. patch 2/9: dropped patch 3/9: use folio_putback_lru() patch 4/9: dropped patch 5/9: collect Reviewed-by tag patch 7/9: splitted out to make it easier to move forward 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 (6): mm/vmscan: add a comment about MADV_FREE pages check in folio_check_dirty_writeback mm/vmscan: introduce helper function reclaim_page_list() 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: remove obsolete comment in kswapd_run mm/vmscan: use helper folio_is_file_lru() mm/vmscan.c | 64 +++++++++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 31 deletions(-)