From mboxrd@z Thu Jan 1 00:00:00 1970 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=-2.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 03488C47082 for ; Tue, 8 Jun 2021 05:03:31 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7CDE161263 for ; Tue, 8 Jun 2021 05:03:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7CDE161263 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CF1216B006C; Tue, 8 Jun 2021 01:03:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CA1466B006E; Tue, 8 Jun 2021 01:03:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AF3C16B0070; Tue, 8 Jun 2021 01:03:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0214.hostedemail.com [216.40.44.214]) by kanga.kvack.org (Postfix) with ESMTP id 7DB156B006C for ; Tue, 8 Jun 2021 01:03:29 -0400 (EDT) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 1EAFC181AEF07 for ; Tue, 8 Jun 2021 05:03:29 +0000 (UTC) X-FDA: 78229363338.18.79748CC Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by imf09.hostedemail.com (Postfix) with ESMTP id 443D86000144 for ; Tue, 8 Jun 2021 05:03:27 +0000 (UTC) Received: by mail-pg1-f179.google.com with SMTP id 27so15599767pgy.3 for ; Mon, 07 Jun 2021 22:03:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:subject:to:cc:references:in-reply-to:mime-version :message-id:content-transfer-encoding; bh=Oz+R3buVcrrnFDzHn9gaTiP7O9I196VvCyY7n8MTjhQ=; b=Qj0zU6Fr0jpUWq1TVnW6Vq9oyVKbpzpNCcz96cNtfsqJz+CDt7K9gh/+/hueoYIFbN ZM/YCm965Syrc3IwPHQBX7lzFBHXgYdmislg1DwzfWzzXGYd5iZaU2Q5CWORDT1l17Qq dfEA7HMTXHLBoCkAweTQEYMPgSUX3TSXNnb0wJ6DNNpXDFxxR2/d7OuB7MnaEUzT86fg dJol7Z9Q/NoYLJgkQ2vjhGvSSxIrxKWGAjqaPxM1bfOWSdG9nLzp2242tJXcnrDOFuAd 95x/bDuXR5S1XtzNAb2IKGg6eUVYvhJbv1ynxMxXWZ7c2DwxHSXdGApQzF05Eein06iw UD+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:subject:to:cc:references:in-reply-to :mime-version:message-id:content-transfer-encoding; bh=Oz+R3buVcrrnFDzHn9gaTiP7O9I196VvCyY7n8MTjhQ=; b=LaXbdTUaW527J5OGDqh0YYMchJMzlnKRBZmrSCpxlPcmGbduYyIz6b05ctprki6vcL KzfhOiCGkUHEnDY84VKID4vs8sS3Cx4I9NJlUIVcJuX2xs8WxH/gCltG8m3SE9Bk40Pt 5zq9G0ITgpyG92vF4Qt7ntI738fLhipeZq4DoeyCaX6sTQHqRZMuZQ/hTpJ8cwDGN2JQ ZnwHk1kG/x/N8Ljxgjjv2lOmDpnmL5IA/FcITSL+gVco8OjSp7FMG5YmBysNRfJQOV7A IBFzuiT+1xA7E18hPWftiXZ6SJTzv4A0iWyGN84Syi+NSvMZrPNgrTsY1appU4a0jng5 5wwQ== X-Gm-Message-State: AOAM532jyu5tIAOHWT9a7Ih2FjqoplcSazV3/TOzPrv5XEcZwSUcbrCA 8ugR58Ud5k1V/A4ZG1+z4i4= X-Google-Smtp-Source: ABdhPJwle3Pxzn+G7A586bjy9oaf62duVr7i7OL8cojoZ+xK7XtiSlw8tE1QsborIReIZzoYfqmT/w== X-Received: by 2002:a63:2dc2:: with SMTP id t185mr21271238pgt.285.1623128607576; Mon, 07 Jun 2021 22:03:27 -0700 (PDT) Received: from localhost (60-242-147-73.tpgi.com.au. [60.242.147.73]) by smtp.gmail.com with ESMTPSA id v22sm9499204pff.105.2021.06.07.22.03.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Jun 2021 22:03:27 -0700 (PDT) Date: Tue, 08 Jun 2021 15:03:22 +1000 From: Nicholas Piggin Subject: Re: [PATCH v7 00/11] Speedup mremap on ppc64 To: "Aneesh Kumar K.V" Cc: "akpm@linux-foundation.org" , Christophe Leroy , "joel@joelfernandes.org" , "kaleshsingh@google.com" , "Kirill A . Shutemov" , "linux-mm@kvack.org" , "linuxppc-dev@lists.ozlabs.org" , "mpe@ellerman.id.au" , Linus Torvalds References: <20210607055131.156184-1-aneesh.kumar@linux.ibm.com> <3f2b7150-eaba-e1ab-bb88-53a3510727b9@linux.ibm.com> In-Reply-To: <3f2b7150-eaba-e1ab-bb88-53a3510727b9@linux.ibm.com> MIME-Version: 1.0 Message-Id: <1623128236.wygeaklh5o.astroid@bobo.none> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=Qj0zU6Fr; spf=pass (imf09.hostedemail.com: domain of npiggin@gmail.com designates 209.85.215.179 as permitted sender) smtp.mailfrom=npiggin@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 443D86000144 X-Stat-Signature: t58kq7patd1nduwzan33owyoc53jbzd1 X-HE-Tag: 1623128607-471522 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Excerpts from Aneesh Kumar K.V's message of June 8, 2021 2:39 pm: > On 6/7/21 3:40 PM, Nick Piggin wrote: >> On Monday, 7 June 2021, Aneesh Kumar K.V =20 >> wrote: This patchset enables MOVE_PMD/MOVE_PUD support on power. This=20 >> requires the platform to support updating higher-level page tables=20 >> without updating page table ZjQcmQRYFpfptBannerStart >> This Message Is From an External Sender >> This message came from outside your organization. >> ZjQcmQRYFpfptBannerEnd >>=20 >>=20 >> On Monday, 7 June 2021, Aneesh Kumar K.V > > wrote: >>=20 >>=20 >> This patchset enables MOVE_PMD/MOVE_PUD support on power. This requi= res >> 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. >>=20 >> Changes from v6: >> * Update ppc64 flush_tlb_range to invalidate page walk cache. >>=20 >>=20 >> I'd really rather not do this, I'm not sure if micro bench mark captures= =20 >> everything. >>=20 >> Page tables coming from L2/L3 probably aren't the primary purpose or=20 >> biggest benefit of intermediate level caches. >>=20 >> The situation on POWER with nest mmu (coherent accelerators) is=20 >> magnified. They have huge page walk cashes to make up for the fact they=20 >> don't have data caches for walking page tables which makes the=20 >> invalidation more painful in terms of subsequent misses, but also=20 >> latency to invalidate (can be order of microseconds whereas a page=20 >> invalidate is a couple of orders of magnitude faster). >>=20 >=20 > If we are using NestMMU, we already upgrade that flush to invalidate=20 > page walk cache right? ie, if we have > PMD_SIZE range, we would upgrade=20 > the invalidate to a pid flush via >=20 > flush_pid =3D nr_pages > tlb_single_page_flush_ceiling; Not that we've tuned that parameter for a long time, certainly not with=20 nMMU probably. Quite possibly it should be higher for nMMU because of=20 the big TLBs they have. (and what about =3D=3D PMD_SIZE)? > =09 > and if it is PID flush if we are using NestMMU we already upgrade a=20 > RIC_FLUSH_TLB to RIC_FLUSH_ALL ? Does P10 still have that bug? At any rate, the core MMU I think still has the same issues just less pronounced. PWC invalidates take longer, and PWC should have most benefit when CPU data caches are highly used and don't filled with page table entries. Thanks, Nick