Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp673872pxu; Wed, 14 Oct 2020 10:42:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZeZKwDeLtVMcWgQxDHnw0MBTnLy4Lcr2wt+4siep93Rc931AAk0iozntap+5ANvOG+dn3 X-Received: by 2002:a05:6402:7d3:: with SMTP id u19mr13833edy.65.1602697332258; Wed, 14 Oct 2020 10:42:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602697332; cv=none; d=google.com; s=arc-20160816; b=evTawFgYD5g531Hw+nWgMDl0p4n3hFLWxt91+8k0+KndnNEO3CX4DlweGzmK/LLRqf Wxyj+hgdkSDO0lhili0nPFtHslyfHlDrrJXWlLljrHpCDvyeybc8W88NJAunvmdkYNRS 57IL8M5pYvODXtTk9jUn5kGFIe7IAk04BRAcw8hUEjolSRSSXqLv8WT9OTuIVP/R/TV2 rqxBCncMGWN/uHkPCUGiRujox+2NvtI5kHodGoJoywx7gyN+AbgcJl6Ic9eU3xJ4d5i/ xZFEQOjd0L2ONYqHsToApaGq57pWpSudVVKA0CMxhdKi4ZI+bkf/Bz+qNt88S5hB3TZe lwWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=FCeRwnRHpBRW2gbHKnyqjomhwY8PEDcYxzfNQP/7LoU=; b=DSLl+ujE5YgAL08I/G90izfsToRReMfV/yotei4juBzY0qnk5U/l8pOOyRWwrvtTxH gY/grrTwIEl94yOiTf52/5UdUiegNHCfzY1SWYYt+teXFZchruPXw5SMl9iwF20RJ7Mn /XnmLjB0GbStDVEWDFqUE1gt7ENkaaKiYUHunETiod1WVSlWGfPhnEu0CP5HXwpyJVUQ 0dN2ywje+3BFy5VWcaI3OdwOMiZz9koOTHmaAV+z/2SYz+qguJI/ftmXchwEOSny9pz9 MAw2tDgGFuIv8m4tOztQY/B3nJUcEREC5ne2XVXtSe3tH43mtuf29jCwTEBAVWj4GPFr UVuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BsRDrsKk; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g1si257330ejf.525.2020.10.14.10.41.49; Wed, 14 Oct 2020 10:42:12 -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=@gmail.com header.s=20161025 header.b=BsRDrsKk; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728402AbgJNPxX (ORCPT + 99 others); Wed, 14 Oct 2020 11:53:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728254AbgJNPxX (ORCPT ); Wed, 14 Oct 2020 11:53:23 -0400 Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F04B0C061755; Wed, 14 Oct 2020 08:53:22 -0700 (PDT) Received: by mail-ed1-x542.google.com with SMTP id l24so3656586edj.8; 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=aj49qYe8oOV7JR4KrT/ZO56z/b9Qpmgj6+lzbVlj2g8aWy9Ou1AAKLJb0BjUgKLzD0 xUwNHxQ7X678Cx+OOPdqRIg1lAPuiaO9CNeos/w64qFAjeNir+MyGq6Jvs/ya+CTmX5f 5vwyYZ5h8BsM5QnCaZBbT7T9im32O+R8AZVT2wnpYX0ilNPHQumgbcO+j8pTb5l/pIM2 VgeuyrELo21ZPpttaGnCc5HfGxp6sf5MT3KAvTteaTi7fn3pAHtTFY5F4RvW4bXoh0/B h09QlE4j6t2xfRXst4qoi00UOJ5B9nPT0uobMESvkFenGdgvJxVqbtfgQaJutCSiBRN3 G8Tw== X-Gm-Message-State: AOAM533Mt4rom/bqJ8mqhGJr7pXPmxmXOTdCPlLvBWxSWTBnc3/7TNi4 b0cOXQyKBEwlkO+zWPLGW1M= 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) Sender: Ingo Molnar 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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * 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