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=-4.0 required=3.0 tests=BAYES_00, 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 0BC9BC4363D for ; Wed, 30 Sep 2020 22:32:26 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 84C84216C4 for ; Wed, 30 Sep 2020 22:32:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 84C84216C4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1595F6B0062; Wed, 30 Sep 2020 18:32:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0E4D96B0068; Wed, 30 Sep 2020 18:32:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EC54C6B006C; Wed, 30 Sep 2020 18:32:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0058.hostedemail.com [216.40.44.58]) by kanga.kvack.org (Postfix) with ESMTP id D30956B0062 for ; Wed, 30 Sep 2020 18:32:24 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 9988E442C for ; Wed, 30 Sep 2020 22:32:24 +0000 (UTC) X-FDA: 77321177808.15.wire42_61090e927196 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin15.hostedemail.com (Postfix) with ESMTP id 7720718141EE4 for ; Wed, 30 Sep 2020 22:32:24 +0000 (UTC) X-HE-Tag: wire42_61090e927196 X-Filterd-Recvd-Size: 4173 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by imf37.hostedemail.com (Postfix) with ESMTP for ; Wed, 30 Sep 2020 22:32:23 +0000 (UTC) IronPort-SDR: qRWTKiS9wBOy60ltNvF7MjTFcOF1OmZJsu4UXvfKCg6xTF9C6Z7FAhmLXlU2Giw+vupdKc6lP3 JcKxuDa0UsCw== X-IronPort-AV: E=McAfee;i="6000,8403,9760"; a="163422671" X-IronPort-AV: E=Sophos;i="5.77,322,1596524400"; d="scan'208";a="163422671" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.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> 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: 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