From patchwork Sat Oct 13 01:31:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Fernandes X-Patchwork-Id: 10639823 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 53EAE14E2 for ; Sat, 13 Oct 2018 01:32:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 314092B8FF for ; Sat, 13 Oct 2018 01:32:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 22FD62B904; Sat, 13 Oct 2018 01:32:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D3D82B8FF for ; Sat, 13 Oct 2018 01:32:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 071B76B0008; Fri, 12 Oct 2018 21:32:20 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id F3C1B6B000A; Fri, 12 Oct 2018 21:32:19 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E04836B000C; Fri, 12 Oct 2018 21:32:19 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by kanga.kvack.org (Postfix) with ESMTP id 9E4466B0008 for ; Fri, 12 Oct 2018 21:32:19 -0400 (EDT) Received: by mail-pf1-f197.google.com with SMTP id r67-v6so13644069pfd.21 for ; Fri, 12 Oct 2018 18:32:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id:mime-version:content-transfer-encoding; bh=/tt52pA472dSwsAAwQJ939rJwzTfqkSaNx9EwvICru0=; b=CAPw4si/muCMqN2aDH5yu+7QxOwgN3rbC5s1orWpoIpxVNMeg2kZnR+4VfBqGoveQm pqixXAKDwIl0LBhOUxNj+PuClfivr3dYp5kzUVkK9oEXOPM3cTGFv53VknU8tWP9bYIY ic1DpRGyH1gJkh/UFa2gBtEP8aI3vWBWq5LXimAddUbe0Yypl3xr557n/vuKXNIgGEuC c6yqMajTk9eElWyIJJ3Zy5tvstzGgyttlF6QB31GSB2OZWiC84FAq13AOAQDFOKN72FH tSPEjOIaYMrXCKTuRPrcntm9xorRTzV1kDFAWpqJYDUhkJVGP7Z4ny5967rhwA4Pwkp6 rnZg== X-Gm-Message-State: ABuFfojH3WUetFZkS6+2Wo3uZfrkwMN2wKqJLg5YyevUQhjc02F+WVap GX55TklXb+zmXr2fpY1Y4lezLfRTNpeHYIRsB7HM4nmHCLg9Fta6u3xqlyMOK0uOTiSFOZfmcA8 ilTaZ65+nj7NI8TkeFHjzPjLID+GXRRiMPDr0/nvq7XXA3kzcWNdt15TgCx/ivoq4mahx5LotTz oR3T+mvlTBpzk4y1s+SyZJkH2Ky+5N9xQQ+YxT8lOITXDD56XQ1k6R08yhbUcHrWJqHmj4RdpxP nhYS6KaVteltJZ/Zde93dIoAeoL+QZkCs4ce0qt4wSV8YHbIk6BTCa4MY+XrwlISKZuQOZK4Efy BbZ1ciqoODO9FSyHN0snNhJ978NTWEb6pmM7UackCXDSsWEyhU/bbAmmyXcYFKLMrDv39PQZTaD 3 X-Received: by 2002:a17:902:7044:: with SMTP id h4-v6mr8069072plt.48.1539394339266; Fri, 12 Oct 2018 18:32:19 -0700 (PDT) X-Received: by 2002:a17:902:7044:: with SMTP id h4-v6mr8069025plt.48.1539394338329; Fri, 12 Oct 2018 18:32:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539394338; cv=none; d=google.com; s=arc-20160816; b=rEMivKUuNtTLJh3wOxn6tJ6TSpX17ZcvF32spAkmrCv7oq8SAOWTeCTpSSMPBAkANA kLlfb0zMkBjSLxPmVshX9+jG40lah11n8MEKUyTziNpQp5zaKUoLOwAyQlzX+VR3a6+I G/muTnQBopEkUPVwFGe7huHEzMY7WzHzjro56bVwGWPsC42KK/iTiIhWVQ6Cri4nM3/P a84rcmELv1EosFBH2iexBd/xROveIyaadtnQb1H61K7RxW8SEAdOAONQbnMnfE1xMY1g FcD/oYeI3y0Hw9f3YAP+RT7o9WgPwFElJOWEmie8nBnRROYXKlR4/YL/BVg4xXAIgket ADHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=/tt52pA472dSwsAAwQJ939rJwzTfqkSaNx9EwvICru0=; b=FnZgjAQjh/Yfc2iMzUEEBbN8OnziPBlR/SdQDPHR2/ikF7f1KyfJT7TaHt6as4A0Ak fRuGMkDX7Rw+iqiqS0+mdKOFAgRczZYTtY3DTwd4/Av8UOaq0tF5U+RdPw4uNlDlQuHk Hb5PyS8Tm6MZKOaP9j2Fqu+6DrWgmyFffPVe6nRpyDXL8aIy1z3AI+nSc2xoEJrsEbO/ aEpQgamqhnC8IbO/7cuIF2wnD5My9R9z9wpN7ob8ByLa0UoHJez6SryQ+3zX+gYCusjI gEbilWkQUIa/5RApICXgu2gL2mHSxjfQwVy1x1vzk2wDhoVoFb756NZV//Nsu8ZacMvU SQJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=aZ2XsHZU; spf=pass (google.com: domain of joel@joelfernandes.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=joel@joelfernandes.org Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id n186-v6sor2681479pgn.61.2018.10.12.18.32.18 for (Google Transport Security); Fri, 12 Oct 2018 18:32:18 -0700 (PDT) Received-SPF: pass (google.com: domain of joel@joelfernandes.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=aZ2XsHZU; spf=pass (google.com: domain of joel@joelfernandes.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=joel@joelfernandes.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/tt52pA472dSwsAAwQJ939rJwzTfqkSaNx9EwvICru0=; b=aZ2XsHZUVMUuO5DvSG7J3SKtJwMjFPFkNKSdOTMVPxEWZUBHqCq91bWsY5lJSZ5abW MspF88SV9xG3kBt1cxNpgjwLM9fjqG9Qr8THIveYjgxWMmIJI/3CsoQ1euVVO+u9jU3b 84AjE6qoveKMUd+TSCAUYFppegkJuFE12F9Zo= X-Google-Smtp-Source: ACcGV63QPVBHwSaBapNX/Xe3if6+zBlb78Rh0S4DGfzofyGyhDp7+M5q3Vlq+GIpXS8LG6/GNUgmRw== X-Received: by 2002:a63:ae4d:: with SMTP id e13-v6mr7685442pgp.315.1539394337561; Fri, 12 Oct 2018 18:32:17 -0700 (PDT) Received: from joelaf.mtv.corp.google.com ([2620:0:1000:1601:3aef:314f:b9ea:889f]) by smtp.gmail.com with ESMTPSA id q7-v6sm6507828pfd.164.2018.10.12.18.32.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Oct 2018 18:32:16 -0700 (PDT) From: "Joel Fernandes (Google)" To: linux-kernel@vger.kernel.org Cc: kernel-team@android.com, "Joel Fernandes (Google)" , akpm@linux-foundation.org, Andrey Ryabinin , Andy Lutomirski , anton.ivanov@kot-begemot.co.uk, Borislav Petkov , Catalin Marinas , Chris Zankel , dancol@google.com, Dave Hansen , "David S. Miller" , elfring@users.sourceforge.net, Fenghua Yu , Geert Uytterhoeven , Guan Xuetao , Helge Deller , hughd@google.com, Ingo Molnar , "James E.J. Bottomley" , Jeff Dike , Jonas Bonn , Julia Lawall , kasan-dev@googlegroups.com, "Kirill A. Shutemov" , kvmarm@lists.cs.columbia.edu, Ley Foon Tan , linux-alpha@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@linux-mips.org, linux-mm@kvack.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-um@lists.infradead.org, linux-xtensa@linux-xtensa.org, lokeshgidra@google.com, Max Filippov , mhocko@kernel.org, minchan@kernel.org, nios2-dev@lists.rocketboards.org, pantin@google.com, Peter Zijlstra , Richard Weinberger , Rich Felker , Sam Creasey , sparclinux@vger.kernel.org, Stafford Horne , Stefan Kristiansson , Thomas Gleixner , Tony Luck , Will Deacon , x86@kernel.org (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)), Yoshinori Sato Subject: [PATCH 0/4] Add support for fast mremap Date: Fri, 12 Oct 2018 18:31:56 -0700 Message-Id: <20181013013200.206928-1-joel@joelfernandes.org> X-Mailer: git-send-email 2.19.0.605.g01d371f741-goog MIME-Version: 1.0 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: X-Virus-Scanned: ClamAV using ClamSMTP Hi, Here is the latest "fast mremap" series. The main change in this submission is to enable the fast mremap optimization on a per-architecture basis to prevent possible issues with architectures that may not behave well with such change. x86: select HAVE_MOVE_PMD for faster mremap (v1) arm64: select HAVE_MOVE_PMD for faster mremap (v1) mm: speed up mremap by 500x on large regions (v2) v1->v2: Added support for per-arch enablement (Kirill Shutemov) treewide: remove unused address argument from pte_alloc functions (v2) v1->v2: fix arch/um/ prototype which was missed in v1 (Anton Ivanov) update changelog with manual fixups for m68k and microblaze. Joel Fernandes (Google) (4): treewide: remove unused address argument from pte_alloc functions (v2) mm: speed up mremap by 500x on large regions (v2) arm64: select HAVE_MOVE_PMD for faster mremap (v1) x86: select HAVE_MOVE_PMD for faster mremap (v1) arch/Kconfig | 5 ++ arch/alpha/include/asm/pgalloc.h | 6 +- arch/arc/include/asm/pgalloc.h | 5 +- arch/arm/include/asm/pgalloc.h | 4 +- arch/arm64/Kconfig | 1 + arch/arm64/include/asm/pgalloc.h | 4 +- arch/hexagon/include/asm/pgalloc.h | 6 +- arch/ia64/include/asm/pgalloc.h | 5 +- arch/m68k/include/asm/mcf_pgalloc.h | 8 +-- arch/m68k/include/asm/motorola_pgalloc.h | 4 +- arch/m68k/include/asm/sun3_pgalloc.h | 6 +- arch/microblaze/include/asm/pgalloc.h | 19 +----- arch/microblaze/mm/pgtable.c | 3 +- arch/mips/include/asm/pgalloc.h | 6 +- arch/nds32/include/asm/pgalloc.h | 5 +- arch/nios2/include/asm/pgalloc.h | 6 +- arch/openrisc/include/asm/pgalloc.h | 5 +- arch/openrisc/mm/ioremap.c | 3 +- arch/parisc/include/asm/pgalloc.h | 4 +- arch/powerpc/include/asm/book3s/32/pgalloc.h | 4 +- arch/powerpc/include/asm/book3s/64/pgalloc.h | 12 ++-- arch/powerpc/include/asm/nohash/32/pgalloc.h | 4 +- arch/powerpc/include/asm/nohash/64/pgalloc.h | 6 +- arch/powerpc/mm/pgtable-book3s64.c | 2 +- arch/powerpc/mm/pgtable_32.c | 4 +- arch/riscv/include/asm/pgalloc.h | 6 +- arch/s390/include/asm/pgalloc.h | 4 +- arch/sh/include/asm/pgalloc.h | 6 +- arch/sparc/include/asm/pgalloc_32.h | 5 +- arch/sparc/include/asm/pgalloc_64.h | 6 +- arch/sparc/mm/init_64.c | 6 +- arch/sparc/mm/srmmu.c | 4 +- arch/um/include/asm/pgalloc.h | 4 +- arch/um/kernel/mem.c | 4 +- arch/unicore32/include/asm/pgalloc.h | 4 +- arch/x86/Kconfig | 1 + arch/x86/include/asm/pgalloc.h | 4 +- arch/x86/mm/pgtable.c | 4 +- arch/xtensa/include/asm/pgalloc.h | 8 +-- include/linux/mm.h | 13 ++-- mm/huge_memory.c | 8 +-- mm/kasan/kasan_init.c | 2 +- mm/memory.c | 17 +++-- mm/migrate.c | 2 +- mm/mremap.c | 67 +++++++++++++++++++- mm/userfaultfd.c | 2 +- virt/kvm/arm/mmu.c | 2 +- 47 files changed, 169 insertions(+), 147 deletions(-)