Message ID | 20200930222130.4175584-5-kaleshsingh@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=mUQX=DH=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 3CCCE112C for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 30 Sep 2020 22:22:45 +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 E955B20719 for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 30 Sep 2020 22:22:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="SC/wAjVy"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="W1iWTcIg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E955B20719 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=ptK3dNZe87NWQrHKOoIgWMaPofwnJUVGQLwXMXyiZng=; b=SC/wAjVyPP2wkZoQVpBGqdsmL MK5TmmNXcQnh6Yhikwollux15LGn9TqusYphbrQZAZWz5P0HRzMU7NRC7oaVAlcQ8WZfRlJoQUClj KEToqckk/n6EYcdTzI3NaPDb9zUFNmsSzFf7cmxMxHcpd++TY2Ed7ri6LfeX8w2qNhjaM8xVcggGz bygxr0Wp0rD6Z/Ot6mbk+wJx2zun5fqInvKt1bd4Y/L38v+3bjaLVl16Fek/iU+q9cxN7gT3gnoXX Z4NbVvqlX6TuRE1/Qop0b6ENT5FrqCHkP0xuHQvPUtmpDOQwMJPD6xbd0JnC3IQJd35YggD2R5aB8 2pMB/obpg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNkUX-0006Np-To; Wed, 30 Sep 2020 22:22:30 +0000 Received: from mail-qv1-xf49.google.com ([2607:f8b0:4864:20::f49]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNkUP-0006J7-Hg for linux-arm-kernel@lists.infradead.org; Wed, 30 Sep 2020 22:22:22 +0000 Received: by mail-qv1-xf49.google.com with SMTP id 99so1899826qva.1 for <linux-arm-kernel@lists.infradead.org>; Wed, 30 Sep 2020 15:22:19 -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=r9i4rFwlO0Ri1Z8TnSbsRvxZfWKWakVdyJrZ8aN7lSY=; b=W1iWTcIgxIUy2UVtGwKg/FWOAbFwxj1yZWmUPz5Pi/125KT5znQ+tf41yAd1LXtU3d Uib3iflcCUIsFkmFwF65SPdIo0tOd05bt6iEjAmwvgkuxVugygP1L5ds1Ja8WufaiuMV xz81lcY5xrAL+nyfM3Z0hdPj/tJ43t16HfcFkrJ+MxmieS3E1BV/xbXh8PvXr1ROpI8b rCKYtMByUOGystQtiQJjncYyQgIpF3rGdUXr5N8/ZwBTqs43v+RaP/0IRmqIv5X0KeCw wjabq5p+HsWNPVNiSZT1vRrkK3OoQqkBQQ+qiqurkNU1dwg9e3kAqbptm+mdcIc9xW87 dADg== 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=r9i4rFwlO0Ri1Z8TnSbsRvxZfWKWakVdyJrZ8aN7lSY=; b=iqrKQSsoP7R2UCby7/fygevsOeJQhadzUmihE/pSM0XQQA8nydTTIgqEQGyhPBTkbn ApSV2z4Lp1lGlUdnr+9LHHUcQbsJ5QZYVV7LBPwoCDxaKto4daXBOCSSAspChNSujHbY iT5ZUTt3OoBuAASSiILmacD0sh2AUaey4EWBrygM8jqGkd7SuWfnxfHopLYzWc1X20YI H5qry4YSXUoHLb/sQotQBHfZQWDJtKMAchjYaxHdIo4ubvPdeZfrq3NPYGwwLI80HaAA z0KP826sMDLDjfgAfFA5Bdj0f0FngUEzV080k9DELUe1iC7mVnCLFc9d81Ek0tMHZcKP D2oA== X-Gm-Message-State: AOAM531N2WsqVnni6BdjvUc9t8PlDhdHziZxAyejizrf/6JX82BJJmT2 rYzcZ1v+LwVIS7tm9h2D0TMOg9yPOgRYqIX1nA== X-Google-Smtp-Source: ABdhPJw/sR64l5kK5cZN6wHaMabXV7sFr12f7agBjeiB0rYDcGu7AUGvx40hqtjxrcgjvKmLH0L0Diy+P9Slii6SiQ== X-Received: from kaleshsingh.c.googlers.com ([fda3:e722:ac3:10:14:4d90:c0a8:2145]) (user=kaleshsingh job=sendgmr) by 2002:ad4:58e3:: with SMTP id di3mr4707465qvb.54.1601504537414; Wed, 30 Sep 2020 15:22:17 -0700 (PDT) Date: Wed, 30 Sep 2020 22:21:21 +0000 In-Reply-To: <20200930222130.4175584-1-kaleshsingh@google.com> Message-Id: <20200930222130.4175584-5-kaleshsingh@google.com> Mime-Version: 1.0 References: <20200930222130.4175584-1-kaleshsingh@google.com> X-Mailer: git-send-email 2.28.0.709.gb0816b6eb0-goog Subject: [PATCH 4/5] arm64: 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-20200930_182221_634726_118C5864 X-CRM114-Status: GOOD ( 15.33 ) X-Spam-Score: -7.0 (-------) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-7.0 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:f49 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -7.5 USER_IN_DEF_DKIM_WL From: address is in the default DKIM white-list -0.0 SPF_PASS SPF: sender matches SPF record 1.2 MISSING_HEADERS Missing To: header 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -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.5 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>, Kamalesh Babulal <kamalesh@linux.vnet.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, Dave Martin <Dave.Martin@arm.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>, Zi Yan <ziy@nvidia.com>, surenb@google.com, linux-arm-kernel@lists.infradead.org, SeongJae Park <sjpark@amazon.de>, 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/arm64/Kconfig b/arch/arm64/Kconfig index 844d089668e3..4d521f0a5863 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -122,6 +122,7 @@ config ARM64 select HANDLE_DOMAIN_IRQ select HARDIRQS_SW_RESEND select HAVE_MOVE_PMD + select HAVE_MOVE_PUD select HAVE_PCI select HAVE_ACPI_APEI if (ACPI && EFI) select HAVE_ALIGNED_STRUCT_PAGE if SLUB
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 19x improvement in performance on arm64. (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 arm64. All times are in nanoseconds. Control HAVE_MOVE_PUD 1247761 74271 1219896 46771 1094792 59687 1227760 48385 1043698 76666 1101771 50365 1159896 52500 1143594 75261 1025833 61354 1078125 48697 1134312.6 59395.7 <-- Mean time in nanoseconds A 1GB mremap completion time drops from ~1.1 milliseconds to ~59 microseconds on arm64. (~19x speed up). Signed-off-by: Kalesh Singh <kaleshsingh@google.com> --- arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+)