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=-4.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 B357EC4363D for ; Wed, 30 Sep 2020 22:48:38 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2E0DB20719 for ; Wed, 30 Sep 2020 22:48:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="bxTKekaM"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="Q60Wco9+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2E0DB20719 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=7mrW0cg9nUbfpy+8yktXAIcp9280SXFjdsj3rpcjmPM=; b=bxTKekaM7w4X1fiTSPnsEOCJy AOOVu3pDPotv6fk8EhrnclyWv6QhZuorn/oboMtmtDS5vXuddQ7CaAEBkMXD+CjhN8wVLcFwOY8sj 7DpsqsAFDrqedes0MN5MToAzDeiHsJXirFxWyG08k7gXfbsukb0b3cvVusFKCWtka91gvEBBuBKBE 5Yh34yA0CZuWJ8xbOJE0qMtliHdpnsutvqwL2plaRYSaM9uKFEWXYw++QsHZFdXuWs5JDYUzA+XdQ MU4s34x01hSAlu77ok87Am99+OAZs1a2A2AfxDVetHPXgIssjeiAohphsiWj2u6sQ8GdF3to+YYkN MYtWBqIQA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNksR-0002cA-Qx; Wed, 30 Sep 2020 22:47:11 +0000 Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNksO-0002Zi-St for linux-arm-kernel@lists.infradead.org; Wed, 30 Sep 2020 22:47:09 +0000 Received: by mail-qk1-x741.google.com with SMTP id q63so3334259qkf.3 for ; Wed, 30 Sep 2020 15:47:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=eTCFS3cfNEjOOKerZt+01daLGyP2fALUEUrJKhPYQ6w=; b=Q60Wco9+qfTN9GN/1gnoYEIQQnEJVS2L83J5fgMwYnhnkv7Iv+r7c6Vgvp8vKtK8q9 rEM+N2vD7SVboMi/LAS8n2Zi+bj/nEN/JUkRTbILPg4KptgS/sai/DwC/U+BaUsCAibi Iz8o1www1zeq5WMk+xVPn7qtQ5kkq14mC4HBugMazodVeXKe4YLW1pFY+APoOet0ttnU 3M0aPOwOD9YdezoRsvacCrR+i5YHVPSpDjasMZPxu4qszz5MxkWLRmMxDqV4KqH0bN7U qmHzpDNrLbiB0ndVTWpRvW6+vtA0FVgaxwlLdLxhMOO7cs9+iaxRlVuPu+79VoLAnuUQ X1gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=eTCFS3cfNEjOOKerZt+01daLGyP2fALUEUrJKhPYQ6w=; b=j+v71O5Xh/UXPU9E2kDyZpk+pY4q+V6TMigiCsM8AC4EyhYhzu4+dLDGVTxYiIS2Kx Uk09lIDE17yZgSRxE0W8KM9gmkGDSQbwf4sxv86VJhwyIVNryZWo8FE3hSv1uI4rfbFO sXqKXfSMEK9WKdWoXpTuT4KQu3qrL4h4OHPwh4bzjvtvoHX/sRLPPcZ064rUe5u6cC3G i2+FJDY8sP4SU7CM51JeVG+zzx7y3KMlVMZ7Due12xNAi43zRf+fWPngJRvCsPt/XSZM 4O1OyLVZ6o+3fgz9Herd7FSkIQ/fyvXqHMKRMi9+v9Kb5+NVwvgqk6v0Ti/1SUmc3J8V OgUw== X-Gm-Message-State: AOAM533qOBB/rD3pyc1eDMwvDGszQLJZq9yyzIxBJz51o7kivglurjVw YbY2rUmdlmTwyTNcuUbo958pGBW7mhgislf6oY3GBw== X-Google-Smtp-Source: ABdhPJyjwVPl2fhViaAT3lHMvkqOwO/mNzNLjDWv6IL9TDeuZgJgld0fPPUBd37HpyVU3t+KqnNcAnOFdiMzfYOyhes= X-Received: by 2002:a05:620a:1367:: with SMTP id d7mr4910010qkl.20.1601506025306; Wed, 30 Sep 2020 15:47:05 -0700 (PDT) MIME-Version: 1.0 References: <20200930222130.4175584-1-kaleshsingh@google.com> <20200930223207.5xepuvu6wr6xw5bb@black.fi.intel.com> In-Reply-To: From: Joel Fernandes Date: Wed, 30 Sep 2020 18:46:54 -0400 Message-ID: Subject: Re: [PATCH 0/5] Speed up mremap on large regions To: Lokesh Gidra X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200930_184708_988900_D1BBF341 X-CRM114-Status: GOOD ( 23.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Gavin Shan , Brian Geffon , Peter Zijlstra , Catalin Marinas , Kalesh Singh , Ram Pai , Kamalesh Babulal , "open list:MEMORY MANAGEMENT" , William Kucharski , Sandipan Das , "open list:KERNEL SELFTEST FRAMEWORK" , "H. Peter Anvin" , Christian Brauner , Shuah Khan , Mina Almasry , Jia He , Arnd Bergmann , Will Deacon , Masahiro Yamada , the arch/x86 maintainers , Krzysztof Kozlowski , Ingo Molnar , Sami Tolvanen , "Cc: Android Kernel" , Hassan Naveed , Masami Hiramatsu , Ralph Campbell , Kees Cook , Minchan Kim , Zhenyu Ye , John Hubbard , Frederic Weisbecker , Borislav Petkov , Thomas Gleixner , Suren Baghdasaryan , "moderated list:ARM64 PORT \(AARCH64 ARCHITECTURE\)" , SeongJae Park , Dave Hansen , linux-kernel , Mike Rapoport , "Aneesh Kumar K.V" , Andrew Morton , "Kirill A. Shutemov" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Sep 30, 2020 at 6:42 PM Lokesh Gidra wrote: > > On Wed, Sep 30, 2020 at 3:32 PM Kirill A. Shutemov > wrote: > > > > On Wed, Sep 30, 2020 at 10:21:17PM +0000, Kalesh Singh wrote: > > > mremap time can be optimized by moving entries at the PMD/PUD level if > > > the source and destination addresses are PMD/PUD-aligned and > > > PMD/PUD-sized. Enable moving at the PMD and PUD levels on arm64 and > > > x86. Other architectures where this type of move is supported and known to > > > be safe can also opt-in to these optimizations by enabling HAVE_MOVE_PMD > > > and HAVE_MOVE_PUD. > > > > > > Observed Performance Improvements for remapping a PUD-aligned 1GB-sized > > > region on x86 and arm64: > > > > > > - HAVE_MOVE_PMD is already enabled on x86 : N/A > > > - Enabling HAVE_MOVE_PUD on x86 : ~13x speed up > > > > > > - Enabling HAVE_MOVE_PMD on arm64 : ~ 8x speed up > > > - Enabling HAVE_MOVE_PUD on arm64 : ~19x speed up > > > > > > Altogether, HAVE_MOVE_PMD and HAVE_MOVE_PUD > > > give a total of ~150x speed up on arm64. > > > > Is there a *real* workload that benefit from HAVE_MOVE_PUD? > > > We have a Java garbage collector under development which requires > moving physical pages of multi-gigabyte heap using mremap. During this > move, the application threads have to be paused for correctness. It is > critical to keep this pause as short as possible to avoid jitters > during user interaction. This is where HAVE_MOVE_PUD will greatly > help. And that detail should totally have gone into the commit message :-/ Thanks, - Joel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel