Message ID | 20201002162101.665549-7-kaleshsingh@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=pvy/=DJ=kvack.org=owner-linux-mm@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 D6E4A112C for <patchwork-linux-mm@patchwork.kernel.org>; Fri, 2 Oct 2020 16:22:39 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9824A206FA for <patchwork-linux-mm@patchwork.kernel.org>; Fri, 2 Oct 2020 16:22:39 +0000 (UTC) Authentication-Results: mail.kernel.org; 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 9824A206FA Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CD7556B0074; Fri, 2 Oct 2020 12:22:38 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id C5F926B0075; Fri, 2 Oct 2020 12:22:38 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B4E316B0078; Fri, 2 Oct 2020 12:22:38 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0213.hostedemail.com [216.40.44.213]) by kanga.kvack.org (Postfix) with ESMTP id 87DC86B0074 for <linux-mm@kvack.org>; Fri, 2 Oct 2020 12:22:38 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 0DF72180AD801 for <linux-mm@kvack.org>; Fri, 2 Oct 2020 16:22:38 +0000 (UTC) X-FDA: 77327503596.20.level80_0e0d131271a5 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id CDEF5180C07AF for <linux-mm@kvack.org>; Fri, 2 Oct 2020 16:22:37 +0000 (UTC) X-Spam-Summary: 1,0,0,238c79ae0f943853,d41d8cd98f00b204,3zfn3xwskcfm5v6zd2d381219916z.x97638fi-775gvx5.9c1@flex--kaleshsingh.bounces.google.com,,RULES_HIT:41:152:355:379:387:541:800:960:973:988:989:1260:1277:1313:1314:1345:1359:1437:1516:1518:1535:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:3138:3139:3140:3141:3142:3152:3352:3865:3866:3867:3868:3870:3871:3872:3874:4250:4321:4605:5007:6261:6630:6653:6742:6743:7875:7903:9969:10004:10400:11026:11473:11658:11914:12295:12296:12297:12438:12555:12895:12986:13069:13161:13229:13311:13357:14181:14394:14659:14721:21444:21451:21627:30054,0,RBL:209.85.160.201:@flex--kaleshsingh.bounces.google.com:.lbl8.mailshell.net-62.18.0.100 66.100.201.100;04y8qkx6biqn18fw588kdy7ozczzoocnnw8fei7grxth6mo5khb7shj1cju8yim.1a8oqyx7daohybym6wkpixofzchpa8ijgud9wkmqg8de9web5dudhyawhy9guqj.h-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFt ime:24,L X-HE-Tag: level80_0e0d131271a5 X-Filterd-Recvd-Size: 5874 Received: from mail-qt1-f201.google.com (mail-qt1-f201.google.com [209.85.160.201]) by imf40.hostedemail.com (Postfix) with ESMTP for <linux-mm@kvack.org>; Fri, 2 Oct 2020 16:22:37 +0000 (UTC) Received: by mail-qt1-f201.google.com with SMTP id w10so1363851qtt.23 for <linux-mm@kvack.org>; Fri, 02 Oct 2020 09:22:37 -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=WZOVdu/RU2uzEZjlUPqMI11idK50fb9EqScPbgyCS9dnAZYTqK/gUDH+MGnD7PYEMx SHrwOwEY1UaJlYd4wawm011vyzK4R2933VPsSF5S/uX0ZVQOvZ24OBQWDtmLK83ahnE0 PTG4IoII47gTT7zuNovK09Zpyvj3YcG7k5mRw5zVWzTn83kILi7o5iSxCspj7XwfmiY6 nbvG1hMz40u1F7VCnTljhFad9EFeYzvovAIEEjDcQlq2nxvZx10PFwDEKoNVySS4etlV gx5AvkQHJduxKwPlKALMsiO10IkAii7yc1eMtFuIDl7XUZczaItt/Ho8LumNawIZqt/v SfmA== X-Gm-Message-State: AOAM530ZNW5nZ1kEjTnmbQeecYlcdrZpjxWgDy9vfemhfLoxygo2RI4C yS+mm75+DSGGFqTyHjmxNDhsBUg+MEdeqLFZgA== 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> Cc: surenb@google.com, minchan@google.com, joelaf@google.com, lokeshgidra@google.com, kaleshsingh@google.com, kernel-team@android.com, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>, x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>, Andrew Morton <akpm@linux-foundation.org>, Shuah Khan <shuah@kernel.org>, Kees Cook <keescook@chromium.org>, "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>, Peter Zijlstra <peterz@infradead.org>, Masahiro Yamada <masahiroy@kernel.org>, Arnd Bergmann <arnd@arndb.de>, Sami Tolvanen <samitolvanen@google.com>, Frederic Weisbecker <frederic@kernel.org>, Krzysztof Kozlowski <krzk@kernel.org>, Hassan Naveed <hnaveed@wavecomp.com>, Christian Brauner <christian.brauner@ubuntu.com>, Stephen Boyd <sboyd@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Mark Brown <broonie@kernel.org>, Mike Rapoport <rppt@kernel.org>, Gavin Shan <gshan@redhat.com>, Zhenyu Ye <yezhenyu2@huawei.com>, Anshuman Khandual <anshuman.khandual@arm.com>, Jia He <justin.he@arm.com>, John Hubbard <jhubbard@nvidia.com>, Zi Yan <ziy@nvidia.com>, Dave Hansen <dave.hansen@intel.com>, Mina Almasry <almasrymina@google.com>, "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>, Ram Pai <linuxram@us.ibm.com>, Ralph Campbell <rcampbell@nvidia.com>, Sandipan Das <sandipan@linux.ibm.com>, Brian Geffon <bgeffon@google.com>, Masami Hiramatsu <mhiramat@kernel.org>, SeongJae Park <sjpark@amazon.de>, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org Content-Type: text/plain; charset="UTF-8" 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: <linux-mm.kvack.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(+)