Message ID | 20201002162101.665549-7-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 12329112C for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 2 Oct 2020 16:23:03 +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 C4C72206FA for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 2 Oct 2020 16:23:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="AQ8bE7oW"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="Z2BhCB0i" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C4C72206FA 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=AQ8bE7oWRVRiWszp/FqjRIPsA P/4movm4TjPKidtGjdgk7dlaQLIzD1+0B7JN0PvwKFXgiQKddKwilTdNw96TtzAd1JK+B4S7/ykiG 1rkLtU5BNr1hBr6jIaaqGRzv6XFFpWSu0rgON8OZaDhNbP4nQjeOdHZBgy7cZ0iGaxLXuZE8XyoVa px63PwNc+Bedm01goIPyrNnffAJ72Vjw9Upz71Lu88jfw61ZusJ+qq+UA+kgFXgFnY5WYJRhWCAwG GU0wwFOcKwrSSkTZ+UOdIHPbMnbuTHkiZP5sWImH/EF7u2L40Kwb+SVpXeOqfxXT8WY0PcFEo866U E0CzjHbeA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kONpW-0002zp-SF; Fri, 02 Oct 2020 16:22:46 +0000 Received: from mail-qt1-x84a.google.com ([2607:f8b0:4864:20::84a]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kONpT-0002vd-6M for linux-arm-kernel@lists.infradead.org; Fri, 02 Oct 2020 16:22:43 +0000 Received: by mail-qt1-x84a.google.com with SMTP id g10so1401830qto.1 for <linux-arm-kernel@lists.infradead.org>; Fri, 02 Oct 2020 09:22:38 -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=Z2BhCB0ionBjY9f7rJg975U+QnCTCPpylLVtNijw2nkc9jOX0nWeWzaScP/MiSCHxb VlNw+IBd6+iMm5/zsKLjJhp4Av/TRf3MlDYx51iPzzIF3DYfrx3bJCSrtH9C//COkKxc xSYhR8fO9b21qmYKgflHjxUWg6wu/GpUAhEGJPmZeDcdY7rbfDAfRXb8euzLbp12Zh88 edKzBO0V9SHioyYGqGPIsn7hVLnsZnoCKmyX8mkVd22fnpHi1uxrWXuN4V+FYJ+VfUUh jHc4fZgacTCxZJu3LoVwWYVB64D6hIAt2jp6nQ4THkRgwkXaDAkjk/QHsk/CbqUR/Y1b Hr2A== 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=n+lpWY7yzSqCCV5o95LC07sMbZzhbvXKPBQ2SjIiJmO2HwRmheOgKlxzcaZ5tfsSAD Kys/rTkX4Hueq++OkY1HNUKYsqJ4sBp+hnhFilyJIQ2imzfhVkjlNa1YaZxfl/lxXVi1 FQYghs9VsGvSKWSYPhoi23kLBo0f+U942zOpe1CvrlMu9EyiWZthDDJ7Up+a9vkswtET 9IR96eGO46AIJixuIwB15VFeS3f6zgp933hocxrZvdpAiNjsLrIHjF7+wYnnzYnQHlf6 F4uvlJ6WBODMbIsrRH/pqGFwk3US5mPXalOGFJAteo4dbC5ZbA5WWXenp45HlKNcpDQY mRDw== X-Gm-Message-State: AOAM533OL/kXOk+8x0tEf6naEewLV6YTiVOgubKB7Q2gIsKwIa7ak8tF 4v9Zt58gSjaHUB5+Hj6Odaqr1SwTGiEWkKl/+A== X-Google-Smtp-Source: ABdhPJwWzjZJWRiWHzB7SAUtAP2b0hza2Y8k4Vz+cdfMrWfqG4bkLxAOeDCVeFU+z7OT3ayRXnDmDOceZZsYYAHZbg== X-Received: from kaleshsingh.c.googlers.com ([fda3:e722:ac3:10:14:4d90:c0a8:2145]) (user=kaleshsingh job=sendgmr) by 2002:ad4:4527:: with SMTP id l7mr3023885qvu.2.1601655756530; Fri, 02 Oct 2020 09:22:36 -0700 (PDT) Date: Fri, 2 Oct 2020 16:20:51 +0000 In-Reply-To: <20201002162101.665549-1-kaleshsingh@google.com> Message-Id: <20201002162101.665549-7-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 6/6] 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-20201002_122243_236072_DF946D7A X-CRM114-Status: GOOD ( 15.53 ) 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:84a 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>, Anshuman Khandual <anshuman.khandual@arm.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>, 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>, Zi Yan <ziy@nvidia.com>, surenb@google.com, linux-arm-kernel@lists.infradead.org, SeongJae Park <sjpark@amazon.de>, linux-mm@kvack.org, Stephen Boyd <sboyd@kernel.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(+)