From patchwork Tue Aug 1 02:31:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13335694 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 B74C4C41513 for ; Tue, 1 Aug 2023 02:20:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 556252800C7; Mon, 31 Jul 2023 22:20:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4E16B2800C6; Mon, 31 Jul 2023 22:20:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3771C2800C7; Mon, 31 Jul 2023 22:20:09 -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 2055428007A for ; Mon, 31 Jul 2023 22:20:09 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id E56A7A0403 for ; Tue, 1 Aug 2023 02:20:08 +0000 (UTC) X-FDA: 81073930896.24.5C6FAB1 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf16.hostedemail.com (Postfix) with ESMTP id 57789180005 for ; Tue, 1 Aug 2023 02:20:05 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf16.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1690856407; a=rsa-sha256; cv=none; b=vCuZSOm0Jz2Zcr0gJFCLW0Pg8K/JB91niatanhqiJkHWcss9Fe0fXrTxB8C1oxJ/qGWWca scoOSESQ2c/AGoHeAvRrGCPYVnByQiVex6AkYSSMUAOCb2MekXX8lqKdt4mDkX6e29nTfr XcWuaz81elWXew7D+OzNWlrCzi1Wb4s= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf16.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1690856407; 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=DzWFhcBl+1imQTaePma3KgU+R2NZsZ4wzlUeTwI+aQA=; b=r6iKRgt7eg3nQNMmMgNEccj6JBIqyXaOjJcCAvGa/oxgNwzd9C5CeSK4z5CerQL06zWTLn QvPHfTRZPb33XMR6HnR8hsRQvTLHxT1nRt+UNaM729HEHhZvelkb4I7vJXA7y3lSkDRQPu j1PMaMsnNf0UstgbVRBKXlbWbTHiJL4= Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4RFJdH6NGczNmhL; Tue, 1 Aug 2023 10:16:35 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by dggpemm100001.china.huawei.com (7.185.36.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Tue, 1 Aug 2023 10:20:00 +0800 From: Kefeng Wang To: Andrew Morton , Catalin Marinas , Will Deacon , Mike Kravetz , Muchun Song , Mina Almasry , , , , , CC: , , <21cnbao@gmail.com>, Kefeng Wang Subject: [PATCH v2 0/2] mm: hugetlb: fix mremap tlb flush Date: Tue, 1 Aug 2023 10:31:43 +0800 Message-ID: <20230801023145.17026-1-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm100001.china.huawei.com (7.185.36.93) X-CFilter-Loop: Reflected X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 57789180005 X-Stat-Signature: iihi3eqd5q1njix9yt9s66upxdum3yh3 X-Rspam-User: X-HE-Tag: 1690856405-164996 X-HE-Meta: U2FsdGVkX1+uxDznfuXPX0uLsheJMPvzW6cy0MQ7wh0Oxdf39sHWKqlNSzxvYYQbYRM0D1eIElslrbJlOtW7u1mvBh1Oe2y9QDbyJlnpoSv5CVd+l8n0hoFtKz/tycKc9d5q6Z/lxRsNo5nVRw3nVAYVr0HSDSI6UX5vMHMj5qZnPQ2+OfirGF9ChJ+EbRorCgatKXKK4hiy+b9PPP/J12nLwZZ3prBaAmNlN6JHa1mhN32loZVTcMl6qA8wbDIr5ad+4lWUZ6W4qfrbCaquQsfcxV6SeGDgPFIyB3m+K6158YZIPC8wBgF86V1o16TTF+8eBLNW65kBmyRu4LRYU3iwM3S0Ccb3xfHoGtC0K5ZvLfH/pS9o5ygtrq9LIpjhAMQtrD5zAgFfQv7pPw8erXa2J/yWQt1C7eZmD7gJBHQ5ZmJuh0UyeJL/dKhUYfrNtjwMxoOvQzpyh/ZgYDdpdnSISHA1p8VCr9ovgsLWfNCCjzNdYbp58/q7bwy/Il4oAcmyf6GZibPx31qgARmE26U9kr2LLsc1YCFoYsFGmzGXTgLXq4U9hkpUPcBLhOLyG+DnpucUq6AxtvMJulE2uFnKy0/8VmMAkKjarebf8EASeDTomsTsklVO6uDuHu8a5PbNslmRnFPPuWoRp8Y8t/dcT2iVg66EbmuoKt9ifEF9pUMTZwUp1wQmPzgChNQKGNBlkKgK3PRxvI/X3FSKF/Iw52GTkqEWpZq90ZfgG8PmAZSRDKEJw/O7JbPTihNwZWpXUkpeIeXqh3B1L4K1EKaR0tOD9RX82ICfjaHoKqEI77AKV9vxumpnrSlC1cYxpUzbT2MrD0Wo1Wp2VDL7OC5svaWaRtbj973RSiJNBrSkq9zXoR15ePG1D8NDphVKo5+VbmxHK5CuR0TwKIvZzVWniWgCLaKB9/gcr6ROrxpMgjoAWJ1lXw1kVEfbbpCklvEDOBU5aSQahWsKsMA Jrf5q7XV 67Sx4oceXnZSwr8Uh+GWDUNUsFiSeWMXVUAG3HdddXQrOo5XB1wVhuIW/SP14HVJPUcMrbPNmauGWfa/j+rtdIQdzjlBXbGjSpiuS/eEOm2rNs8pRR7tY8m/UMg== 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: The first patch uses correct flush tlb functions when move page tables, and second patch is a small tlb flush optimization for hugepage on arm64. v2: - drop uncorrected move_normal_pmd/pud() changes - add flush_hugetlb_tlb_range() on arm64 instead of changing generic flush_tlb_range() - collect RB/ACK Kefeng Wang (2): mm: hugetlb: use flush_hugetlb_tlb_range() in move_hugetlb_page_tables() arm64: hugetlb: enable __HAVE_ARCH_FLUSH_HUGETLB_TLB_RANGE arch/arm64/include/asm/hugetlb.h | 12 ++++++++++++ mm/hugetlb.c | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-)