From patchwork Tue Jun 28 13:28:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 12898286 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 6992BCCA479 for ; Tue, 28 Jun 2022 13:28:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C870D6B0071; Tue, 28 Jun 2022 09:28:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BC09E8E0003; Tue, 28 Jun 2022 09:28:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9F3358E0006; Tue, 28 Jun 2022 09:28:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 7A1108E0003 for ; Tue, 28 Jun 2022 09:28:43 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 55B3221265 for ; Tue, 28 Jun 2022 13:28:43 +0000 (UTC) X-FDA: 79627724526.29.3A76957 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf06.hostedemail.com (Postfix) with ESMTP id 7F495180031 for ; Tue, 28 Jun 2022 13:28:41 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4LXQNl6WqFzkWlW; Tue, 28 Jun 2022 21:26:47 +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; Tue, 28 Jun 2022 21:28:37 +0800 From: Miaohe Lin To: CC: , , , , , , Subject: [PATCH v2 00/16] A few cleanup patches for huge_memory Date: Tue, 28 Jun 2022 21:28:19 +0800 Message-ID: <20220628132835.8925-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: dggems701-chm.china.huawei.com (10.3.19.178) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656422921; a=rsa-sha256; cv=none; b=tTXTsAg+KcAZRYdvCxQ67O7wXwvZONvhxP0wfzxIXZ5o5jaYoH7SVIOhcwqoh0sp+4zW1F it3A1+/yHCzMMe2JsmtI6T3d7y8I14dgej4qpo2e5i+/UpJlDi866jUDC2t4xqVa/JrSPp 262SBxuQ+KxrDD2Q72Y9gOU53JbhkZY= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf06.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656422921; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=R4zXhv3JDI5v9lEtdViRL/ys8k1AwVLi3z+hx6FHpno=; b=tJIzrAUorXJcOz4X3Jz23BhQ/7Fr2Ei2vVORFmh7yW9B38q8A9w32ScHL8RUrdA++mEN3o zvqQAXLPbQr9jbiV4O/JckASJNjIcWUmt66cYNzQYyj1jhXXzj4kgimFRjSHxZhAdg1uqE 4qjcx/VE2tQ2AFG6/5Y5OSSRzI6WSBc= X-Stat-Signature: oeas6r4gbku6rdhx7kd599y5xrqh5qra X-Rspamd-Queue-Id: 7F495180031 Authentication-Results: imf06.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf06.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com X-Rspamd-Server: rspam10 X-Rspam-User: X-HE-Tag: 1656422921-519844 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 cleaup patches to remove duplicated codes, add/use helper functions, fix some obsolete comments and so on. More details can be found in the respective changelogs. Thanks! --- v2 This patch set is rebased on linux-next-20220628. Collect Reviewed-by tag and Acked-by per Muchun and Zach. Thanks. fix typo in 3/16 replace last parameter of touch_p[u|m]d to bool split "mm/huge_memory: minor cleanup for split_huge_pages_pid" drop "mm/huge_memory: add helper __get_deferred_split_queue" enhance comment of page_deferred_list v1 This patch set is based on linux-next-20220621. --- Miaohe Lin (16): mm/huge_memory: use flush_pmd_tlb_range in move_huge_pmd mm/huge_memory: access vm_page_prot with READ_ONCE in remove_migration_pmd mm/huge_memory: fix comment of __pud_trans_huge_lock mm/huge_memory: use helper touch_pud in huge_pud_set_accessed mm/huge_memory: use helper touch_pmd in huge_pmd_set_accessed mm/huge_memory: rename mmun_start to haddr in remove_migration_pmd mm/huge_memory: use helper function vma_lookup in split_huge_pages_pid mm/huge_memory: use helper macro __ATTR_RW mm/huge_memory: fix comment in zap_huge_pud mm/huge_memory: check pmd_present first in is_huge_zero_pmd mm/huge_memory: try to free subpage in swapcache when possible mm/huge_memory: minor cleanup for split_huge_pages_all mm/huge_memory: fix comment of page_deferred_list mm/huge_memory: correct comment of prep_transhuge_page mm/huge_memory: comment the subtly logic in __split_huge_pmd mm/huge_memory: use helper macro IS_ERR_OR_NULL in split_huge_pages_pid include/linux/huge_mm.h | 6 +-- mm/huge_memory.c | 90 +++++++++++++++++------------------------ 2 files changed, 40 insertions(+), 56 deletions(-)