Received: by 2002:a4f:b056:0:0:0:0:0 with SMTP id m22csp1410104ivi; Fri, 2 Oct 2020 09:24:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNoz3lO9SSdesAJXCdPxPmLcbMESudclxKfcdkpC1OYnqTWMDqpSIM0xB3wqZhYBQtn4RD X-Received: by 2002:a17:906:9443:: with SMTP id z3mr3209514ejx.156.1601655879369; Fri, 02 Oct 2020 09:24:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601655879; cv=none; d=google.com; s=arc-20160816; b=g8DMEK8K4JK4tPLJ3qeQ66tCG6QuV+Rw9EYFq6yCq/gjfUu5jioDeqiuyU1w7/38FG aWisUYh9KaH2UmWziJi2D+69E9vjlU+nxxN4eGtFJMe6smvZZiMlm1K/wQnRQFZYKVlS Da/wBbqz1b5p6GoSB2YcdjteyO06W+Frotzl4lV7GdC4sdO9FU9BKE3ayxOPomjxNjCI SrjmfV2YTddzPdvS6S0axNl7rq/7oYdbTMgh3bRKEhWVQC2o9qvIuIYYEobQJu9ZO30L e1MSRuVDX8lSyMxunJAb6w1Ovtc59sKS1IbIJXfYUD2DPTJ6eLvuVs7JckHYPhGMM4AG n+gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:cc:from:subject:references:mime-version :message-id:in-reply-to:date:sender:dkim-signature; bh=LRJDXnxkqiv1fXN9f+/QaOavubXnRcM3sdCzYDHh/KU=; b=1GoRp9Ag5Zi3TkGC/mtD3RyYeCWed3ShnPov7XZ4gLY/Z/3CcQItx4luzepyDdkVeq qtaasADlCoc8A1RkH8oFYuGc2hX188T9m1oGuwJeH7c55sA/F1fYIQw/BaRsHNgPvsye ze4hVVuV+YSeGIIA3B8LYSSIIfyBME09NYE4C9yle+Vbc1Q+5spLn1lXRclpGEFgUvWW 4Ba8CpO0fCrRSLfG7I1Nbum80QQMRC/ItCPhqSD4CLKdjsE95eeYzhLXhu1lp7nznXGZ IHVlmEx9dG5YO8p1oUO9IDMSyyg2enIJqcsQ1GVVobk8ieTHHzlcpajCf8gw3vVCT135 Afgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=hDQngTLl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r15si1336226edo.318.2020.10.02.09.24.16; Fri, 02 Oct 2020 09:24:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=hDQngTLl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388174AbgJBQW3 (ORCPT + 99 others); Fri, 2 Oct 2020 12:22:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726386AbgJBQW2 (ORCPT ); Fri, 2 Oct 2020 12:22:28 -0400 Received: from mail-qt1-x84a.google.com (mail-qt1-x84a.google.com [IPv6:2607:f8b0:4864:20::84a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3C7AC0613E2 for ; Fri, 2 Oct 2020 09:22:26 -0700 (PDT) Received: by mail-qt1-x84a.google.com with SMTP id w10so1363384qtt.23 for ; Fri, 02 Oct 2020 09:22:26 -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=qe5p0TVOTWcINA4ZVV7mxjcu5HEGjGTrM0+VuJMSmd2SiH16Z6/Hh4TnxxAnUscE/k IQqXCmgpNp+XPCXc1lELhGfSjS7W5felkS808UoCBgXDB6s+iDQ01LzzvWR1nO9UC8KE vGM+m1JSHIbxousHPaeq2slRmimZNAxmPCHaDOiKUAdPnD4w3bDI+NLbsYIyhCPLcUaT aL1yziG8wdWBdKPLd4plGK2bF6X1MhE34nZwONrPes/0tQoV+2uge32kmLarYAc15onD m7Rf05n7lNZ88Z9crlDzunHHgosa9UHEBoPqUbviCy3+tg4lLk+rU32k9UeRu+HO3d2i e8KQ== X-Gm-Message-State: AOAM533KD1HI52gIDDIBidYax04mIsGuUrxKa912q9ZL+gTw8RRCg3X8 r2RE9Tau3vQW1OzfgI6sUSllr1zCCkMpX7bCig== Sender: "kaleshsingh via sendgmr" 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 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 , "Aneesh Kumar K.V" , Kees Cook , Peter Zijlstra , Arnd Bergmann , Masahiro Yamada , Sami Tolvanen , Krzysztof Kozlowski , Frederic Weisbecker , Hassan Naveed , Christian Brauner , Mark Rutland , Mark Brown , Mike Rapoport , Gavin Shan , Zhenyu Ye , Jia He , John Hubbard , Mike Kravetz , Ralph Campbell , Ram Pai , "Kirill A. Shutemov" , Mina Almasry , Sandipan Das , Dave Hansen , William Kucharski , Masami Hiramatsu , Ira Weiny , SeongJae Park , Brian Geffon , 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" To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+) 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 -- 2.28.0.806.g8561365e88-goog