From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,MISSING_HEADERS,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2AB9C4363C for ; 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 55A5B208A9 for ; 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 55A5B208A9 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) Received: by kanga.kvack.org (Postfix, from userid 40) id C5F926B0075; Fri, 2 Oct 2020 12:22:38 -0400 (EDT) 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-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 ; 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 ; 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 ; Fri, 2 Oct 2020 16:22:37 +0000 (UTC) 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 ; Fri, 2 Oct 2020 16:22:37 +0000 (UTC) Received: by mail-qt1-f201.google.com with SMTP id w10so1363851qtt.23 for ; 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 Cc: surenb@google.com, minchan@google.com, joelaf@google.com, lokeshgidra@google.com, kaleshsingh@google.com, kernel-team@android.com, Catalin Marinas , Will Deacon , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , Andrew Morton , Shuah Khan , Kees Cook , "Aneesh Kumar K.V" , Peter Zijlstra , Masahiro Yamada , Arnd Bergmann , Sami Tolvanen , Frederic Weisbecker , Krzysztof Kozlowski , Hassan Naveed , Christian Brauner , Stephen Boyd , Mark Rutland , Mark Brown , Mike Rapoport , Gavin Shan , Zhenyu Ye , Anshuman Khandual , Jia He , John Hubbard , Zi Yan , Dave Hansen , Mina Almasry , "Kirill A. Shutemov" , Ram Pai , Ralph Campbell , Sandipan Das , Brian Geffon , Masami Hiramatsu , SeongJae Park , 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: 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 --- arch/x86/Kconfig | 1 + 1 file changed, 1 insertion(+) 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 -- 2.28.0.806.g8561365e88-goog