Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp46715pxk; Wed, 30 Sep 2020 17:25:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVTit/c2jQhe85sfUj5XMRXHuUR6LVk/twiOmpiY0xomhOwEBQ3h+4/sSWlHbcgUlurO8s X-Received: by 2002:a17:906:5008:: with SMTP id s8mr5735156ejj.408.1601511954963; Wed, 30 Sep 2020 17:25:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601511954; cv=none; d=google.com; s=arc-20160816; b=cOfYzYC5JUKkiCsAiVYHf0F4rmK+I/rPAvHJRdBGh8OyqUAud8YUmrEW8lelfpbxfc OnEx+5RV8C/jsdIfpNm5MmDHTEl8ybTuapOd1qg6Eu/1F0gTXZhJ0UKxWJuQMb+PAB1K K3cLoSl4PUuZ3n1WnV9h7b+jbRWGoXONsRbsUs5L02KK83NncaU4bigZsEcKYbmu8WBq jXSULRKrIbgJxoUTQIXDtlFZHA7b563cMPmdNUfWFQ57mRy9ls+TcsdBMmXEFHsXzbUZ iZq7tlL7jUqhoJz7raWXkP+tj2h5okzsMYtuXXXZJ7izGvO54DrhudVmb6fcC9ZQpUBE qQVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:ironport-sdr :ironport-sdr; bh=1CYY870WBgfexh/3G9uX5ey8Y8T2ack32RaOhPhdd8E=; b=0I/Z0ZjyoLCRgd1Gg7IsFWF2206ZWxsq0Qa2U4q8zYbXTbYKf5iKyPor7rtxhVxUPC 5TnTs/jL8/+DCXi+CO/OD4/TYl5AnS2ZIBToDfm+lwF5RCnHvg0jLVcHfxUhNJ9YqG+J lFGVP7YeWLNWDEfO628uplbRMK4UaydIDrrgUw7nnGtiy936NSFBsKcXIk3TMpW0KSAA sDZI1NJesD07rovX9A7Wccf3aBhd1OS6zMhmTPUxTgIazNF4OHac9bizYWhpqTuHOoAa iZWH1xnkhWz74Gl0D39KYeXVraM2zvIAcTkWyHVP53JHI+iUz4x+HTc9m5n4ZT/uXPPU /jvw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ds20si2404354ejc.62.2020.09.30.17.25.31; Wed, 30 Sep 2020 17:25:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730233AbgI3WcV (ORCPT + 99 others); Wed, 30 Sep 2020 18:32:21 -0400 Received: from mga05.intel.com ([192.55.52.43]:33895 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725799AbgI3WcV (ORCPT ); Wed, 30 Sep 2020 18:32:21 -0400 IronPort-SDR: xOC0ktZfK1NCNWeQogukt8i330INMNoUsqwMibEqWS0UwC+Gwc39nP2491n0TvpnPDsbBdY9lJ UmmUHaZZAxfA== X-IronPort-AV: E=McAfee;i="6000,8403,9760"; a="247286591" X-IronPort-AV: E=Sophos;i="5.77,322,1596524400"; d="scan'208";a="247286591" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Sep 2020 15:32:19 -0700 IronPort-SDR: Q7rxTOYZCmdrYkAyQbw0lh7HWMnLV4/XuKBvDgBo1VQoNDv2ETCE5XAs1PQ1BJnxZZojLYXOdv zUvQHx6xucDg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,322,1596524400"; d="scan'208";a="308332496" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga003.jf.intel.com with ESMTP; 30 Sep 2020 15:32:08 -0700 Received: by black.fi.intel.com (Postfix, from userid 1000) id B4156A8; Thu, 1 Oct 2020 01:32:07 +0300 (EEST) Date: Thu, 1 Oct 2020 01:32:07 +0300 From: "Kirill A. Shutemov" To: Kalesh Singh Cc: surenb@google.com, minchan@google.com, joelaf@google.com, lokeshgidra@google.com, kernel-team@android.com, Catalin Marinas , Will Deacon , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , Andrew Morton , Shuah Khan , "Aneesh Kumar K.V" , Kees Cook , Peter Zijlstra , Sami Tolvanen , Masahiro Yamada , Arnd Bergmann , Frederic Weisbecker , Krzysztof Kozlowski , Hassan Naveed , Christian Brauner , Mark Rutland , Mike Rapoport , Gavin Shan , Zhenyu Ye , Jia He , John Hubbard , William Kucharski , Sandipan Das , Ralph Campbell , Mina Almasry , Ram Pai , Dave Hansen , Kamalesh Babulal , Masami Hiramatsu , Brian Geffon , SeongJae Park , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH 0/5] Speed up mremap on large regions Message-ID: <20200930223207.5xepuvu6wr6xw5bb@black.fi.intel.com> References: <20200930222130.4175584-1-kaleshsingh@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200930222130.4175584-1-kaleshsingh@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 30, 2020 at 10:21:17PM +0000, Kalesh Singh wrote: > mremap time can be optimized by moving entries at the PMD/PUD level if > the source and destination addresses are PMD/PUD-aligned and > PMD/PUD-sized. Enable moving at the PMD and PUD levels on arm64 and > x86. Other architectures where this type of move is supported and known to > be safe can also opt-in to these optimizations by enabling HAVE_MOVE_PMD > and HAVE_MOVE_PUD. > > Observed Performance Improvements for remapping a PUD-aligned 1GB-sized > region on x86 and arm64: > > - HAVE_MOVE_PMD is already enabled on x86 : N/A > - Enabling HAVE_MOVE_PUD on x86 : ~13x speed up > > - Enabling HAVE_MOVE_PMD on arm64 : ~ 8x speed up > - Enabling HAVE_MOVE_PUD on arm64 : ~19x speed up > > Altogether, HAVE_MOVE_PMD and HAVE_MOVE_PUD > give a total of ~150x speed up on arm64. Is there a *real* workload that benefit from HAVE_MOVE_PUD? -- Kirill A. Shutemov