Message ID | 20201002162101.665549-6-kaleshsingh@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=6DlO=DJ=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 7A6CB139A for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 2 Oct 2020 16: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 3416E2085B for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 2 Oct 2020 16:22:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="cd7eLBgi"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="hDQngTLl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3416E2085B 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=4NcafjA8AXy/3KR0dJFotjUwsC5aEoAiWxDrv1aynGI=; b=cd7eLBgipbWjzsvLyV50SxiFA 69BV0E34ruejftVXb0MghCAORGfOighk7ttMATN93Z/4JTCKFNwye+enG59HFlU6+qSO72x/t5cwq w3NGNht3Q3alAbpcXXXBxlCZrPt5DlXXZf5t+lnn6oQ/mL38MwDAMvNgNxmpShv/1fQIMvaGA7Yk7 O8ZoOY+wrIs6nMt9NMxutkVdcduQ/rvqyPnIHNl/Ig7Gs+cGgeL1/v4z/yLI7AlCk39wrv/Y50wWZ tYFxJYtlBi7vfSBzJoDp7x+UxyGqCvzvLQN04E4zxSFrY/rQRye22L0Wo6XvVEMVQI+6DAGwVo6Wh MacfbznMQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kONpJ-0002uG-S0; Fri, 02 Oct 2020 16:22:33 +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 1kONpF-0002qf-Kk for linux-arm-kernel@lists.infradead.org; Fri, 02 Oct 2020 16:22:30 +0000 Received: by mail-qv1-xf49.google.com with SMTP id de12so1139550qvb.12 for <linux-arm-kernel@lists.infradead.org>; Fri, 02 Oct 2020 09:22:27 -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=LRJDXnxkqiv1fXN9f+/QaOavubXnRcM3sdCzYDHh/KU=; b=hDQngTLlwEHOqbG2+qPgfBLtWoEqSz0RkrlSy0B5xHc4i/KeZ/R920ykBSSrSrqDgX CEX4Tgn8ZKwrNAh0SCxx3MqEG1DqjESis+XdXBnejPZw0+2u+FY9vYO4kxboKo2PiyEQ 3iBxhoVO+LzKAusmFIm+4JGhC1ynyXra7m+eLxYhBZxVxK4E0ZBejCp4qEzKcGsWpJZE puM1f74zS6RH4HpPzKX98Rg31esYNa7V4eey0WQFt5clFp1JKfoZGwplRwD6lHtSQ9F4 6x6NO+IrtXl6t5Fyg5dLe+13Pu8d05KrIWnvnQtTqOQg/lZsiJgR/56sN9FPpKJIu6P+ hpRg== 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=LRJDXnxkqiv1fXN9f+/QaOavubXnRcM3sdCzYDHh/KU=; b=oEXqNQw9vx1t/SSuS+UljaDJGOUNBgmKXIMPC1wNmj28L7Nnm6BqMuzq4eFmr4E6ky tMPnBwa7zcMLmujSWH2B61w151S7rONpaefZpOl+cdl30RXcx/nM5W7G0BwujHaPVZAx vlmPb+8hj9uNLygafxSMmYbq6g3Rrqsg8mIYneziOKrCxzgXatzkssK7KdM3L8ojocz8 JZWpftxeLI0EZ8j5pDlXc1sofgMAlg57S0HiaYGzju1l8sOcfenrZrLX2cT3wMt0OkKp Mn/l7Wle6VlUjOsBJq6UCYYve341WfW0yV6nbEsuVJKd+X2rjhQEohq5LnGfFgk/nsDD 2DJQ== X-Gm-Message-State: AOAM531QdkjDIqwUogJeO0XEhCbygrWKnAB+fXMvQJLDJ9Dz9Edh4e5k xBd3k8MHLIST6Stqcu8MILMlZZmyabNbf7WQEw== X-Google-Smtp-Source: ABdhPJw5Qv2OwIK9h4CVpf46tlO/7EN7KFe9wLwV6R2ARAWl/2Z2ldNw6qedIQHz6XTQMkbUNtRhsapSAzj+MENlEg== X-Received: from kaleshsingh.c.googlers.com ([fda3:e722:ac3:10:14:4d90:c0a8:2145]) (user=kaleshsingh job=sendgmr) by 2002:a05:6214:b0d:: with SMTP id u13mr2886535qvj.17.1601655745859; Fri, 02 Oct 2020 09:22:25 -0700 (PDT) Date: Fri, 2 Oct 2020 16:20:50 +0000 In-Reply-To: <20201002162101.665549-1-kaleshsingh@google.com> Message-Id: <20201002162101.665549-6-kaleshsingh@google.com> Mime-Version: 1.0 References: <20201002162101.665549-1-kaleshsingh@google.com> X-Mailer: git-send-email 2.28.0.806.g8561365e88-goog Subject: [PATCH v2 5/6] 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-20201002_122229_700197_90E47320 X-CRM114-Status: GOOD ( 15.49 ) 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:f49 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_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -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>, linux-mm@kvack.org, 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>, Ingo Molnar <mingo@redhat.com>, Sami Tolvanen <samitolvanen@google.com>, Ira Weiny <ira.weiny@intel.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>, Sandipan Das <sandipan@linux.ibm.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>, William Kucharski <william.kucharski@oracle.com>, linux-kernel@vger.kernel.org, "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>, Andrew Morton <akpm@linux-foundation.org>, Mike Rapoport <rppt@kernel.org>, Mike Kravetz <mike.kravetz@oracle.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(+)