From patchwork Thu Apr 22 05:43:14 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: 12217675 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 D41BBC433B4 for ; Thu, 22 Apr 2021 05:43:54 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 17D3B60238 for ; Thu, 22 Apr 2021 05:43:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 17D3B60238 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 8C3696B006C; Thu, 22 Apr 2021 01:43:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 871E26B006E; Thu, 22 Apr 2021 01:43:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6C4446B0071; Thu, 22 Apr 2021 01:43:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0254.hostedemail.com [216.40.44.254]) by kanga.kvack.org (Postfix) with ESMTP id 4A36E6B006C for ; Thu, 22 Apr 2021 01:43:53 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id F1B348248D7C for ; Thu, 22 Apr 2021 05:43:52 +0000 (UTC) X-FDA: 78058911504.16.7C64D9A Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by imf25.hostedemail.com (Postfix) with ESMTP id 1B6346000112 for ; Thu, 22 Apr 2021 05:43:48 +0000 (UTC) Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 13M5Y8XH114502; Thu, 22 Apr 2021 01:43:40 -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=GwhhICo0RxsjTF/vsRbJu/butH/VsDxBR710d6yAvno=; b=b+Mwsy+6qWsO+GfA3dN7LIrUyCEvUyj8usB1SUQREtfNop51Zi4vy3MtoGg9BYw8g23T iZwWAXUG2bZflwUWl0GveR2hJTDJpfHJsQg2DyutLL+uK+rTyQPaUuob19N/e1+0P4be MS+Z7ld7pLVliyR8wHugpYEFnF0SVo4d5la+Yl3iM8eKk+/tK5YbU3mBh7KPJRNPr3FP gpOm9K0FP/bC4trz18dqCL7qYFpPxCZqmU1erUaPiqYxhTL4MVGjZjWkYyUm1ILKIvDX k3eNzsYz3h1nVQSgh0elC5HBR0be1vz2rr3+4BDQS1CCN967LHNa/7dICAyK87SxPscq /Q== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 38331n8c4a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Apr 2021 01:43:39 -0400 Received: from m0098409.ppops.net (m0098409.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 13M5YxPS117761; Thu, 22 Apr 2021 01:43:39 -0400 Received: from ppma03wdc.us.ibm.com (ba.79.3fa9.ip4.static.sl-reverse.com [169.63.121.186]) by mx0a-001b2d01.pphosted.com with ESMTP id 38331n8c3w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Apr 2021 01:43:39 -0400 Received: from pps.filterd (ppma03wdc.us.ibm.com [127.0.0.1]) by ppma03wdc.us.ibm.com (8.16.0.43/8.16.0.43) with SMTP id 13M5gYOr021350; Thu, 22 Apr 2021 05:43:38 GMT Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by ppma03wdc.us.ibm.com with ESMTP id 37yqa9fn8b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Apr 2021 05:43:38 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 13M5hbDE55706276 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 22 Apr 2021 05:43:37 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 31A2878069; Thu, 22 Apr 2021 05:43:37 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E0D357805E; Thu, 22 Apr 2021 05:43:33 +0000 (GMT) Received: from skywalker.ibmuc.com (unknown [9.199.37.130]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 22 Apr 2021 05:43:33 +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, Christophe Leroy , "Aneesh Kumar K.V" Subject: [PATCH v5 0/9] Speedup mremap on ppc64 Date: Thu, 22 Apr 2021 11:13:14 +0530 Message-Id: <20210422054323.150993-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: 5HwBNVqs_lV50UcMCyslo-0Tns_7wwJD X-Proofpoint-ORIG-GUID: KFzwtuDqLVZdtEgtto0WHHUgACo1gVmu X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.761 definitions=2021-04-22_01:2021-04-21,2021-04-21 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 lowpriorityscore=0 suspectscore=0 bulkscore=0 mlxscore=0 clxscore=1015 phishscore=0 adultscore=0 priorityscore=1501 spamscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104060000 definitions=main-2104220047 X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 1B6346000112 X-Stat-Signature: thax45mg76ufj1dbfqwtb5et8yijrcty Received-SPF: none (linux.ibm.com>: No applicable sender policy available) receiver=imf25; identity=mailfrom; envelope-from=""; helo=mx0a-001b2d01.pphosted.com; client-ip=148.163.156.1 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1619070228-532767 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 v4: * Change function name and arguments based on review feedback. 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 | 29 ++++- 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 | 40 ++++-- tools/testing/selftests/vm/mremap_test.c | 118 ++++++++++-------- 8 files changed, 170 insertions(+), 103 deletions(-)