Message ID | 20201005154017.474722-6-kaleshsingh@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=vj0o=DM=lists.infradead.org=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6401C6CA for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 5 Oct 2020 15:41:56 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 349D620639 for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 5 Oct 2020 15:41:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="iU3iwKmw"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="k5vN5lL8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 349D620639 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:From:Subject:References:Mime-Version:Message-Id: In-Reply-To:Date:Reply-To:To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Rja6W3fxMxM9jMO5PTrVx1ohVjyAnNzOFBe903gh/x0=; b=iU3iwKmwj18h424rhG0UVvM4o q00HuCrBC+ClI4ZSljlydHt3Mk4WehFvtC9V5YtdDrpaMoRK+W+GfbCMNRpkuxm4Vnx2M9Yk9bH51 rCOJuBoEqOzX27tUrRJN6mCzcDXSHVHjFP8E6SEuWuPNgNADWCdPezLi3uNr+gTh0Gq1I9TwZ9L5N b8cwqyFymTYCloiRTRYzGZ2syBFZLJMxVhj13sHp5tLM5F20NHDgSRmVvFZW0cf/hq6GuPM6ZA+Rp r+eT4nMVZ6HoSrm3zhHl5zQklodbuy8TUbcr+c7KaVgJF16gQE6/H+bB8Soa2VXmlUE/OPtUU8Rab /dDdg1H+g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kPScP-0001Z7-Ke; Mon, 05 Oct 2020 15:41:41 +0000 Received: from mail-qk1-x74a.google.com ([2607:f8b0:4864:20::74a]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kPScH-0001VJ-Rk for linux-arm-kernel@lists.infradead.org; Mon, 05 Oct 2020 15:41:37 +0000 Received: by mail-qk1-x74a.google.com with SMTP id 196so6875652qkn.6 for <linux-arm-kernel@lists.infradead.org>; Mon, 05 Oct 2020 08:41:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:cc; bh=bMnBZVJZ0gP6yWIahq+ggDCPy47CsnYvJiYw0n333nM=; b=k5vN5lL8u+dk7kk1dVwMid1XenomFqovMOogievds6K5jd20VXgxbl2GFmp9kcpSBP 6QTRISzHEYP0AwHteqslnrm2lDI4o6TNFzp3eLpPSYPYmosTOpjvr0Tcp5Evej0M8pOG NDN7DhJqs5Pc+2CCYJ9ilX5R5ax+1FWsqWBoizCPssscrao3rJH39V7UmzRBLCdDcBnv /c5HcLQ2tHg6VqfaazIcTVynqbkSBCGQGA1TdVjphaWV+Q9djLrapFHuVINGUeK58Iq2 qSVxl7d+7HUqT/LF6PXQtIH5YrCQ55CM67kkpySUh+9u+hzZIqVOJTquW9YdjteNKCac uGtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:cc; bh=bMnBZVJZ0gP6yWIahq+ggDCPy47CsnYvJiYw0n333nM=; b=tOBn4dMKHHHJzMdCui0SaXnAX1qARUCm+36vUvcFR0JD0hy18b9HORyjIbhvIf1Tji 1+raVUuZVC984lGnT8G8oJp30Mn1Ftz9oei08/TxQQc69YBqnSb/5FKrZRZNE9shpsVi edcH6Gfy5f0ct5EwGt+zBrLuvWrWcekFcm7L7CiN2tCJ39vp5hzIRyVMSlgdzB80oCc9 hhaS6fNCWc0pFUUp1kpSgrCJQ5p4yJVoGLT+MvCpODOiHQl6glD5Oh+y8rcLhNtRvGuF TTilW1cRMwlOPfXDFLKPaTj4/EUsz4RjisQs3bvQFpnmljI22AFpTVKgS5s6AjaGooAZ s4uw== X-Gm-Message-State: AOAM531TABWi9dR1ccFNXS6s+X5Oi44fDoERua69WKL0Qmh00fIbfl1t tqLIla8cWY58m64ZF2jV2eeYOKkJWB3gult2lg== X-Google-Smtp-Source: ABdhPJxCbT3Tk7IhWxN1eyg5aVeN/8oSsg9g9VSjiEzr12333FvC/+nSCGHof4S0Ag8i51NGfN+bVC/79zdrCeEyvg== X-Received: from kaleshsingh.c.googlers.com ([fda3:e722:ac3:10:14:4d90:c0a8:2145]) (user=kaleshsingh job=sendgmr) by 2002:ad4:4594:: with SMTP id x20mr337215qvu.4.1601912490402; Mon, 05 Oct 2020 08:41:30 -0700 (PDT) Date: Mon, 5 Oct 2020 15:40:08 +0000 In-Reply-To: <20201005154017.474722-1-kaleshsingh@google.com> Message-Id: <20201005154017.474722-6-kaleshsingh@google.com> Mime-Version: 1.0 References: <20201005154017.474722-1-kaleshsingh@google.com> X-Mailer: git-send-email 2.28.0.806.g8561365e88-goog Subject: [PATCH v3 5/5] x86: mremap speedup - Enable HAVE_MOVE_PUD From: Kalesh Singh <kaleshsingh@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201005_114133_939325_20B331ED X-CRM114-Status: GOOD ( 15.74 ) X-Spam-Score: -6.5 (------) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-6.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:74a listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.2 MISSING_HEADERS Missing To: header -7.5 USER_IN_DEF_DKIM_WL From: address is in the default DKIM white-list -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 DKIMWL_WL_MED DKIMwl.org - Medium trust sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: joelaf@google.com, Mark Rutland <mark.rutland@arm.com>, Gavin Shan <gshan@redhat.com>, Brian Geffon <bgeffon@google.com>, Peter Zijlstra <peterz@infradead.org>, Catalin Marinas <catalin.marinas@arm.com>, kaleshsingh@google.com, Ram Pai <linuxram@us.ibm.com>, Dave Hansen <dave.hansen@intel.com>, Will Deacon <will@kernel.org>, lokeshgidra@google.com, linux-kselftest@vger.kernel.org, "H. Peter Anvin" <hpa@zytor.com>, Christian Brauner <christian.brauner@ubuntu.com>, Shuah Khan <shuah@kernel.org>, Mina Almasry <almasrymina@google.com>, Jia He <justin.he@arm.com>, Arnd Bergmann <arnd@arndb.de>, "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>, Masahiro Yamada <masahiroy@kernel.org>, x86@kernel.org, Krzysztof Kozlowski <krzk@kernel.org>, Jason Gunthorpe <jgg@ziepe.ca>, Ingo Molnar <mingo@redhat.com>, Sami Tolvanen <samitolvanen@google.com>, kernel-team@android.com, Hassan Naveed <hnaveed@wavecomp.com>, Masami Hiramatsu <mhiramat@kernel.org>, Ralph Campbell <rcampbell@nvidia.com>, Kees Cook <keescook@chromium.org>, minchan@google.com, Zhenyu Ye <yezhenyu2@huawei.com>, John Hubbard <jhubbard@nvidia.com>, Frederic Weisbecker <frederic@kernel.org>, Mark Brown <broonie@kernel.org>, Borislav Petkov <bp@alien8.de>, Thomas Gleixner <tglx@linutronix.de>, surenb@google.com, linux-arm-kernel@lists.infradead.org, SeongJae Park <sjpark@amazon.de>, Yang Shi <yang.shi@linux.alibaba.com>, linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>, Andrew Morton <akpm@linux-foundation.org>, Mike Rapoport <rppt@kernel.org>, Sandipan Das <sandipan@linux.ibm.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org |
Series |
Speed up mremap on large regions
|
expand
|
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 7101ac64bb20..ff6e2755cab8 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -198,6 +198,7 @@ config X86 select HAVE_MIXED_BREAKPOINTS_REGS select HAVE_MOD_ARCH_SPECIFIC select HAVE_MOVE_PMD + select HAVE_MOVE_PUD select HAVE_NMI select HAVE_OPROFILE select HAVE_OPTPROBES
HAVE_MOVE_PUD enables remapping pages at the PUD level if both the source and destination addresses are PUD-aligned. With HAVE_MOVE_PUD enabled it can be inferred that there is approximately a 13x improvement in performance on x86. (See data below). ------- Test Results --------- The following results were obtained using a 5.4 kernel, by remapping a PUD-aligned, 1GB sized region to a PUD-aligned destination. The results from 10 iterations of the test are given below: Total mremap times for 1GB data on x86. All times are in nanoseconds. Control HAVE_MOVE_PUD 180394 15089 235728 14056 238931 25741 187330 13838 241742 14187 177925 14778 182758 14728 160872 14418 205813 15107 245722 13998 205721.5 15594 <-- Mean time in nanoseconds A 1GB mremap completion time drops from ~205 microseconds to ~15 microseconds on x86. (~13x speed up). Signed-off-by: Kalesh Singh <kaleshsingh@google.com> --- arch/x86/Kconfig | 1 + 1 file changed, 1 insertion(+)