From patchwork Wed Apr 14 08:59:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Aneesh Kumar K.V" X-Patchwork-Id: 12202225 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9848DC433B4 for ; Wed, 14 Apr 2021 08:59:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D376161158 for ; Wed, 14 Apr 2021 08:59:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D376161158 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4D1A96B0036; Wed, 14 Apr 2021 04:59:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 481966B006C; Wed, 14 Apr 2021 04:59:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2FAB26B0070; Wed, 14 Apr 2021 04:59:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0018.hostedemail.com [216.40.44.18]) by kanga.kvack.org (Postfix) with ESMTP id 106A26B0036 for ; Wed, 14 Apr 2021 04:59:33 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id BA01F51083EC for ; Wed, 14 Apr 2021 08:59:32 +0000 (UTC) X-FDA: 78030374184.09.7E2F9E4 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by imf14.hostedemail.com (Postfix) with ESMTP id 05D37C0007D4 for ; Wed, 14 Apr 2021 08:59:23 +0000 (UTC) Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 13E8ZAtH191193; Wed, 14 Apr 2021 04:59:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : mime-version : content-type : content-transfer-encoding; s=pp1; bh=QceOfvwBPKbpfXnC9qIHBqr+ylZ6S6n/zPpdNsRdBjE=; b=qlTAt2xv8d3YOD4aJvQAhg6xKF/6gKiBBd4BsDsWBv9qTs74Zjcn0HvopLRmHwElHvLi 6vBWZCQ0/jLthlhUWCBBdC+gZQDqMVYg+csYXLNG5BsxSf8VeYqZKGFFfMsi5qgTPtxZ +IqR+GyxHW0/tFiHwOttJU6rRZt/SsGP8MDbbguP6/sgTilSKIjjxFUF81DrokERD3bS Ipr50d9vPWu6QdVanwCo9wQERjzmzD9yTCo8o/813/WD56rfym+ZmvUFwiVVQsJc+ljH 7OsCO9hmg4pMSFZkevMAtivs+WHRja4DfHny6PZXTdxCV97f3s40rV3VTAbpBnqcUKv7 GA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 37wvw4ru29-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 14 Apr 2021 04:59:27 -0400 Received: from m0098394.ppops.net (m0098394.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 13E8Zb6Y193316; Wed, 14 Apr 2021 04:59:26 -0400 Received: from ppma02wdc.us.ibm.com (aa.5b.37a9.ip4.static.sl-reverse.com [169.55.91.170]) by mx0a-001b2d01.pphosted.com with ESMTP id 37wvw4ru1m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 14 Apr 2021 04:59:26 -0400 Received: from pps.filterd (ppma02wdc.us.ibm.com [127.0.0.1]) by ppma02wdc.us.ibm.com (8.16.0.43/8.16.0.43) with SMTP id 13E8uerF029881; Wed, 14 Apr 2021 08:59:25 GMT Received: from b01cxnp23032.gho.pok.ibm.com (b01cxnp23032.gho.pok.ibm.com [9.57.198.27]) by ppma02wdc.us.ibm.com with ESMTP id 37u3n9yrk1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 14 Apr 2021 08:59:25 +0000 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 13E8xPgY31719790 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 14 Apr 2021 08:59:25 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id ECCF5AE05C; Wed, 14 Apr 2021 08:59:24 +0000 (GMT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4E2A2AE05F; Wed, 14 Apr 2021 08:59:22 +0000 (GMT) Received: from skywalker.ibmuc.com (unknown [9.77.205.193]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 14 Apr 2021 08:59:21 +0000 (GMT) From: "Aneesh Kumar K.V" To: linux-mm@kvack.org, akpm@linux-foundation.org Cc: mpe@ellerman.id.au, linuxppc-dev@lists.ozlabs.org, kaleshsingh@google.com, npiggin@gmail.com, joel@joelfernandes.org, "Aneesh Kumar K.V" Subject: [PATCH v4 0/9] Speedup mremap on ppc64 Date: Wed, 14 Apr 2021 14:29:06 +0530 Message-Id: <20210414085915.301189-1-aneesh.kumar@linux.ibm.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 8l7pi72e3igz7deX_F5ZW2EmVwBKmcU8 X-Proofpoint-ORIG-GUID: pxbkqmheMUvWVAFWhYxiCjeZFdc65Rk3 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.761 definitions=2021-04-14_03:2021-04-14,2021-04-14 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 phishscore=0 suspectscore=0 bulkscore=0 adultscore=0 mlxscore=0 mlxlogscore=999 priorityscore=1501 malwarescore=0 lowpriorityscore=0 clxscore=1015 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104060000 definitions=main-2104140060 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 05D37C0007D4 X-Stat-Signature: 7ww1wp3d87d4j7txcwontwjc8yj51jbx Received-SPF: none (linux.ibm.com>: No applicable sender policy available) receiver=imf14; identity=mailfrom; envelope-from=""; helo=mx0a-001b2d01.pphosted.com; client-ip=148.163.156.1 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1618390763-104509 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, This patchset enables MOVE_PMD/MOVE_PUD support on power. This requires the platform to support updating higher-level page tables without updating page table entries. This also needs to invalidate the Page Walk Cache on architecture supporting the same. Changes from v3: * Fix build error reported by kernel test robot * Address review feedback. Changes from v2: * switch from using mmu_gather to flush_pte_tlb_pwc_range() Changes from v1: * Rebase to recent upstream * Fix build issues with tlb_gather_mmu changes Aneesh Kumar K.V (9): selftest/mremap_test: Update the test to handle pagesize other than 4K selftest/mremap_test: Avoid crash with static build mm/mremap: Use pmd/pud_poplulate to update page table entries powerpc/mm/book3s64: Fix possible build error powerpc/mm/book3s64: Update tlb flush routines to take a page walk cache flush argument mm/mremap: Use range flush that does TLB and page walk cache flush mm/mremap: Move TLB flush outside page table lock mm/mremap: Allow arch runtime override powerpc/mm: Enable move pmd/pud .../include/asm/book3s/64/tlbflush-radix.h | 19 +-- arch/powerpc/include/asm/book3s/64/tlbflush.h | 30 ++++- arch/powerpc/include/asm/tlb.h | 6 + arch/powerpc/mm/book3s64/radix_hugetlbpage.c | 4 +- arch/powerpc/mm/book3s64/radix_tlb.c | 55 ++++---- arch/powerpc/platforms/Kconfig.cputype | 2 + mm/mremap.c | 41 ++++-- tools/testing/selftests/vm/mremap_test.c | 118 ++++++++++-------- 8 files changed, 172 insertions(+), 103 deletions(-)