From patchwork Mon Jul 31 07:48:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13333947 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 9E633C04A94 for ; Mon, 31 Jul 2023 07:39:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CC99728001B; Mon, 31 Jul 2023 03:39:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C77CA28001A; Mon, 31 Jul 2023 03:39:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ACBC728001B; Mon, 31 Jul 2023 03:39:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 9CC6D280012 for ; Mon, 31 Jul 2023 03:39:24 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 5B1ECA0440 for ; Mon, 31 Jul 2023 07:39:24 +0000 (UTC) X-FDA: 81071106648.16.2F37875 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf23.hostedemail.com (Postfix) with ESMTP id B71EE140014 for ; Mon, 31 Jul 2023 07:39:21 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf23.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=1690789162; 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:in-reply-to:references:references; bh=y2xwMHmp2+AF+LplUKlYJQ4KHQF98DXrKqXWA6DlewM=; b=3O1fgeBJ7uyddqKdQgFP0UzZPrcWZTclja0aTIdma3KCC6vWrwdmkQAzcixuHvuGCFK0je eghn4sjjqiD0uZIu2cheaNcqSorzwWMUpE2WE/igXlvH1IxefIJ1YyYLlRdSgRTiUgoPoT 9Xlz5C90TOrNhBYN/tJuHnk9ffFXvPc= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf23.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=1690789162; a=rsa-sha256; cv=none; b=vMemt5EOtqjkEWEW8EJ+S3/WDHcWaJkX59Xx4/EafesTw+7SlEM03MRQUGTNoe6WFtOdFb BMhm/m5twxiXl8pNsUYVAQ18bjD2zdjJ0hd+CWRu/+J+wQ3O+FLB8d2lB+XgpArXtW+Sj8 xu0UiE+1Zjt+m4HaiFYejlu5/lwuPF4= Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4RDqm74d7YzNmbC; Mon, 31 Jul 2023 15:35:51 +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; Mon, 31 Jul 2023 15:39:15 +0800 From: Kefeng Wang To: Andrew Morton , Catalin Marinas , Will Deacon , Mike Kravetz , Muchun Song , Mina Almasry , , , , , CC: , , Kefeng Wang Subject: [PATCH 3/4] mm: mremap: use flush_pud_tlb_range in move_normal_pud() Date: Mon, 31 Jul 2023 15:48:28 +0800 Message-ID: <20230731074829.79309-4-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230731074829.79309-1-wangkefeng.wang@huawei.com> References: <20230731074829.79309-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm100001.china.huawei.com (7.185.36.93) X-CFilter-Loop: Reflected X-Rspam-User: X-Stat-Signature: w45g6ksqp3x9ga3untfsahbwagqqjdhs X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: B71EE140014 X-HE-Tag: 1690789161-854567 X-HE-Meta: U2FsdGVkX18JmyR6ii3zu7n+b+dsx4jLHCBzPfXdQzAA7nKKHA1UwChgFe/vUJtV44hEFNZ7kzHzVtWwAGDZibK+mXKzSzc8TyiltRUkOGQ0mZfril/l/jlBznZwyD3GMOVDpkAFeoQGeeEHH+6miWKTKk7ynQhlVWXCW1cDc6YhmMwo9Aryqi4NZTxkFMWJMwQxNWNdOufhXi1k9t22b/aoA6H8n1iBc6OJG5EV9QNi5OURpC/EydDAKkyOxOdFzxWttqPDU39WNTa9DK7/6hciPJQ+l/5fpwFV9qccGuzZTIAqShj5MzNgEbTNxmo5ZafPv1eKmF3+X49UfPKldIlfZGot3u3lyLMhPCo9egaufxpTTKrLIP4OiJtwrrLY5E3y+LOixQo1xs3rgd2l+QGgm5SN4gFCjsnNqBk3rUtu2n5NZCkyes7EAqdDi6SXutXwPAxxuu247rn+ZLmvqx4AmhOFBoGT57Q/BI/DZBFqHzAPhH9ni5w8yeli1lgDrSFG+zbbmDqiAvSaxzNGG+32T6Te9jVCOwQvZX4o04Gtwxro3T1t/KBRKmOrplWKEQ0pTDZck95fqfQwTdviLf6x44EOm6k9fzMxEOt1Piq9aUS0xl7N7ovSlBa9kFKiUasySxToIyrldqYsA+579UXJcej4sJNRfhpnCZNr7sG7hswAeyd6E/AnnezLPqG2L+BVfGidnahmrDFxk4exniMXpdhGp3d/TafmCXDKc5CUTfROJKwR4PgCQtSMQwTKqv9+FGO4kyY49Wa2Cbd55Ii0AoYBf807i8bEUf1xT4LP0GFVxfvwhsF2oGehJt79kq2tTsXKOBImmGKTwTr9fsuHSm7HIYtLgRmShg3xEG6RVS8XQJE5x1r7shyDumLcJw+fkdLkoVqRjAsRexsz4uvkQ9TEzXkS/J1YkGREcECo8nPeXyssxN8XRhq9GW22bcEyyJvoQLjyn7ccTbE nykUqAfv KLAveMuylvjkWW4R8do1H92eK+AW4oIZPUp4PmyxBZ0hcqTq8dFndWZ5vRTy/cdXSqtsa4XQgnhqTdS4mLCGwl1EZYb5b5wpBGgDNGxjdR1LHGdJcmG/HCHGljzV7HN3OGlDIkoWJtdt0lJJB0M2a2cW6NLIcrpoNiYFXGq5mgnq9WZA6vrGOH/yVfvn3jxvNokSJ 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: Archs may need to do special things when flushing thp tlb, so use the more applicable flush_pud_tlb_range() instead of flush_tlb_range(). Fixes: c49dd3401802 ("mm: speedup mremap on 1GB or larger regions") Signed-off-by: Kefeng Wang --- mm/mremap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/mremap.c b/mm/mremap.c index 1883205fa22b..25114e56901f 100644 --- a/mm/mremap.c +++ b/mm/mremap.c @@ -333,7 +333,7 @@ static bool move_normal_pud(struct vm_area_struct *vma, unsigned long old_addr, VM_BUG_ON(!pud_none(*new_pud)); pud_populate(mm, new_pud, pud_pgtable(pud)); - flush_tlb_range(vma, old_addr, old_addr + PUD_SIZE); + flush_pud_tlb_range(vma, old_addr, old_addr + PUD_SIZE); if (new_ptl != old_ptl) spin_unlock(new_ptl); spin_unlock(old_ptl);