From patchwork Mon Sep 17 00:44:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minchan Kim X-Patchwork-Id: 10601939 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 AE0726CB for ; Mon, 17 Sep 2018 00:47:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9F44B2919B for ; Mon, 17 Sep 2018 00:47:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 932FC2948A; Mon, 17 Sep 2018 00:47:27 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0F4812919B for ; Mon, 17 Sep 2018 00:47:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=ntGxx+R8buGnYHG2uSj1g0pEXECd1AKPBp9rpC1MJ0M=; b=l2yBVyTXDWIKoH bG5PHBXac3XbVd4nfMVT0vmhaD7sL7az41q3pT1GVZtkUWP0kndeXb92WJLdPgD3K8YJVJQ3idEZ0 IPzfhY1ZYYzxNWPE+dSIJ4Yne4RmDLpWmEIA5mNdDR7XPRkQ2J113tgHSzD1ZUvEhnCU08My74SUx MW0h1KWfk2UUYNka3MPeKSuKiVVU6783bxk/QOYUcNUwfkMPt5WswHN5kpt4FVM8HidTIWGDgoV6K SH2v2ezYfBN93NiIKQ/7vF0oDsxZzw2NqBuitUfjTWtP7/SZKS8f2QtNdd527SBjtZFi4GhRxQEZb I2rDCwCLmbazRp/jWGuQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g1hh9-0004um-Ro; Mon, 17 Sep 2018 00:47:19 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g1hh6-0004tf-2K for linux-arm-kernel@lists.infradead.org; Mon, 17 Sep 2018 00:47:17 +0000 Received: by mail-pg1-x542.google.com with SMTP id l63-v6so6814366pga.7 for ; Sun, 16 Sep 2018 17:47:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=em334lGo4en5GvrQrQFpYWC9DYbtgeRD3RKoNlXT0Ig=; b=Re3Fy6d35PpuJ1TwyAbIN+TuOkDgNaYZhHzJ2RoGXz6KZfLppzksOAEnouY3wCA7sN aP3B6a+hYuedQEgKklvfZjOyHw5MCdht7rnFhHj+MuP+MbEYwnfct4AdBjANhzAgkkXN SSNFXzQUr4vQe0bm4JmUrEQRlaxa+L/U0EWxwDOkM0/rPKS3x0jr08P+QG2GmyzemnuO DpoMdrJC1ySCrhgpVlAy+rXJ45MI8xSkiC0o9FjttUG4E8f16EKyQ/mZ3WLcT8Di76St iOiSVZzU4+AoEvZxGbJUvHXv+XzlwZisizi7+05Y48QUJOp0WkHyGDri3zlagE0obLzD Bo0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=em334lGo4en5GvrQrQFpYWC9DYbtgeRD3RKoNlXT0Ig=; b=GKvltfIRJ1k95ttS2qATzDsmqsSM1Qj1fSI7ZPNCSyH2z1x/OUy0kH9mieAsXQeRjH wYGK11TV+ELBFpmVjgJ3MAuWDECzHAh6CY8mXVzjwyHWlLGBM+rV/EFvyS11rnk72nTv v83Pi0TJgtsGk03HXvwEho7hwB55ZbGrWCe5WtpIXi36u3P+lfIfTYn5o0FqW/VoRKVk FtvYRshsYeixPOlEFEYtlzZMn3EOHy8YvgTGH4hlmAcSQbdFBUtj344ja/NmcXo8ZXfU XGCK+Gy9PMikuI7ecDB1e2+6FjWRE+n/1hcSdxxhsbJO3y7/EPWdRexpDnMhjP34lsze NF8A== X-Gm-Message-State: APzg51CybXjcPY8JmjsWJR3PU+t+D1Sqk8mIr4b1txcLgwJqfYaLMks4 DsmF0fDJpI4QqLpNUZlv/pc= X-Google-Smtp-Source: ANB0Vdb2SB8zNspK5OHL16422dsHL/CsGnCX7/XPV3FCjefv4YU646v7/Qrt3r64sX5b5Ot0ng0EEA== X-Received: by 2002:a63:4f14:: with SMTP id d20-v6mr21206245pgb.121.1537145224055; Sun, 16 Sep 2018 17:47:04 -0700 (PDT) Received: from bbox-2.seo.corp.google.com ([2401:fa00:d:10:affa:813f:5380:6613]) by smtp.gmail.com with ESMTPSA id w16-v6sm29311503pfi.101.2018.09.16.17.46.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 16 Sep 2018 17:47:02 -0700 (PDT) From: Minchan Kim To: Andrew Morton , linux@armlinux.org.uk Subject: [PATCH v1 0/3] arm: support get_user_pages_fast Date: Mon, 17 Sep 2018 09:44:48 +0900 Message-Id: <20180917004451.174527-1-minchan@kernel.org> X-Mailer: git-send-email 2.19.0.397.gdd90340f6a-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180916_174716_126524_9AC21913 X-CRM114-Status: GOOD ( 10.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: steve.capper@linaro.org, juju.sung@mediatek.com, catalin.marinas@arm.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, Minchan Kim , miles.chen@mediatek.com, jian-min.lui@mediatek.com, kernel-team@android.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Recently, I got a report get_user_pages_fast helps app's launching time due to reducing uninterruptible sleep time because it could reduce mmap_sem lock contentions when app is launching. To support gupf in ARM-non-LPAE, first patch reorders memory type table to use 5th bit of the page table. Second patch introduces L_PTE_SPECIAL for arm so that last patch can support get_user_pags_fast. I would greatly appreciate if guys review that I screw up something, especially, architecture stuffs. * from RFC * Remove CPU_v7M - Catalin * define DEV_NONSHARED to SHARED - Catalin * https://lkml.kernel.org/r/20180910165011.zcighyuabshsmxjb@armageddon.cambridge.arm.com Minchan Kim (3): arm: mm: reordering memory type table arm: mm: introduce L_PTE_SPECIAL arm: mm: support get_user_pages_fast arch/arm/Kconfig | 2 +- arch/arm/include/asm/pgtable-2level.h | 22 ++- arch/arm/include/asm/pgtable-3level.h | 6 - arch/arm/include/asm/pgtable.h | 13 ++ arch/arm/mm/Makefile | 6 + arch/arm/mm/gup.c | 221 ++++++++++++++++++++++++++ arch/arm/mm/proc-macros.S | 4 +- 7 files changed, 259 insertions(+), 15 deletions(-) create mode 100644 arch/arm/mm/gup.c