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=-6.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 20AC4C43457 for ; Wed, 14 Oct 2020 15:53:28 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 583452222C for ; Wed, 14 Oct 2020 15:53:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BsRDrsKk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 583452222C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 729226B0070; Wed, 14 Oct 2020 11:53:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6B1776B0072; Wed, 14 Oct 2020 11:53:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 552E06B0073; Wed, 14 Oct 2020 11:53:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0210.hostedemail.com [216.40.44.210]) by kanga.kvack.org (Postfix) with ESMTP id 240046B0070 for ; Wed, 14 Oct 2020 11:53:26 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 650963625 for ; Wed, 14 Oct 2020 15:53:25 +0000 (UTC) X-FDA: 77370975570.22.art58_100b28c2720d Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin22.hostedemail.com (Postfix) with ESMTP id 3F33518038E68 for ; Wed, 14 Oct 2020 15:53:25 +0000 (UTC) X-HE-Tag: art58_100b28c2720d X-Filterd-Recvd-Size: 7963 Received: from smtprelay.hostedemail.com (smtprelay0058.hostedemail.com [216.40.44.58]) by imf13.hostedemail.com (Postfix) with ESMTP for ; Wed, 14 Oct 2020 15:53:24 +0000 (UTC) Received: from forelay.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay07.hostedemail.com (Postfix) with ESMTP id 340AB181D3028 for ; Wed, 14 Oct 2020 15:53:24 +0000 (UTC) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 129D7180AD811 for ; Wed, 14 Oct 2020 15:53:24 +0000 (UTC) X-FDA: 77370975528.13.beast41_16128462720d Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin13.hostedemail.com (Postfix) with ESMTP id DD40F18140B69 for ; Wed, 14 Oct 2020 15:53:23 +0000 (UTC) X-HE-Tag: beast41_16128462720d X-Filterd-Recvd-Size: 6102 Received: from mail-ed1-f67.google.com (mail-ed1-f67.google.com [209.85.208.67]) by imf31.hostedemail.com (Postfix) with ESMTP for ; Wed, 14 Oct 2020 15:53:23 +0000 (UTC) Received: by mail-ed1-f67.google.com with SMTP id dg9so3620884edb.12 for ; Wed, 14 Oct 2020 08:53:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=FCeRwnRHpBRW2gbHKnyqjomhwY8PEDcYxzfNQP/7LoU=; b=BsRDrsKkem1/EJ21sYF99A0VMAZTtevuW2QrYxYUmt6sYdyndmABJ/nmg6cKVDgXpw vHIGp6YKub+GJsoCObugr5wZ2Cv59thi76GG/Vy1ruIYmFtTaxwlk6+dZ8tzeWkez0/0 XZXXE4UkjKnFu3HUw/Vo0ejrzm0/jt152eztZgoztDnhIGZwyB58Bp6C9pyqPDWukVsz wisbhHxfCaMw3p8G6rE9x8x/HQPXbJfJ1HCxW5aKzHCLGCBT2dXuqbkzsJL/pQcodaKi hjFaagvCG3FEoJLjhumYFw4HadWvZWasYUGRQZCE352W/8iw4F5rBQe/6F+SGHKK6kEf eKzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=FCeRwnRHpBRW2gbHKnyqjomhwY8PEDcYxzfNQP/7LoU=; b=OCpYxwDaz9o6+mO/cIJPaeXhQeY9g0s5/V7w1x7ID6zHhbtqu9XE3L9AYNDxfRSuyP 4r3Fg2plcp6jwjWvCnTiWUHPXk2cVvI2sojKZ4QNoDXJysz7gEvQg+vc+5uhlW7M0RVW 4XQuWTlwP3x3wYESOZvijC0dTlqP35WmyRhhB+5ozlJf688m5xXM8YAD6jYkclLmp+dN RB8/1aokkK+hhKo/Wb6p7+thdDLpFj4Cu5hWNM0psOZ7V5k2BsIwFUh6kPFiInlkOwse 23kZpER2hmtICX4z01npaMFiYT8IdGmKMnnbmCZXrISDXi67jlhghja5nUbZj21zHNNu /6/Q== X-Gm-Message-State: AOAM531huowGqqj7/nIGsx6z4vn0j5K4YYezbHcC26E6ZnbwerBZRtNS OZF7yBjchpjVktWoQi0xCRM= X-Google-Smtp-Source: ABdhPJxEwur8sPLU2aoBqv3RE/RaHeiWbyEZv0tpx/0pn8DdiaO+u6EiBnlbQAjLeeZ9G+3Cw4+J7g== X-Received: by 2002:aa7:d2d5:: with SMTP id k21mr5761855edr.62.1602690801739; Wed, 14 Oct 2020 08:53:21 -0700 (PDT) Received: from gmail.com (563B81C8.dsl.pool.telekom.hu. [86.59.129.200]) by smtp.gmail.com with ESMTPSA id vr3sm2018390ejb.124.2020.10.14.08.53.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Oct 2020 08:53:21 -0700 (PDT) Date: Wed, 14 Oct 2020 17:53:18 +0200 From: Ingo Molnar To: Kalesh Singh Cc: surenb@google.com, minchan@google.com, joelaf@google.com, lokeshgidra@google.com, kernel-team@android.com, "Kirill A . Shutemov" , Andrew Morton , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , Catalin Marinas , Will Deacon , x86@kernel.org, Shuah Khan , Peter Zijlstra , Kees Cook , "Aneesh Kumar K.V" , Arnd Bergmann , Sami Tolvanen , Masahiro Yamada , Krzysztof Kozlowski , Frederic Weisbecker , Hassan Naveed , Christian Brauner , Anshuman Khandual , Mark Rutland , Gavin Shan , Mike Rapoport , Steven Price , Jia He , John Hubbard , Ram Pai , Sandipan Das , Zi Yan , Mina Almasry , Ralph Campbell , Dave Hansen , 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 Subject: Re: [PATCH v4 5/5] x86: mremap speedup - Enable HAVE_MOVE_PUD Message-ID: <20201014155318.GA3014922@gmail.com> References: <20201014005320.2233162-1-kaleshsingh@google.com> <20201014005320.2233162-6-kaleshsingh@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201014005320.2233162-6-kaleshsingh@google.com> 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: * Kalesh Singh wrote: > 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 > Acked-by: Kirill A. Shutemov > Cc: Andrew Morton > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: Borislav Petkov > Cc: H. Peter Anvin Nice! Assuming it's all correct code: Acked-by: Ingo Molnar Thanks, Ingo