From patchwork Wed Dec 9 16:39:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 11961875 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=-12.0 required=3.0 tests=BAYES_00,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 B495CC4361B for ; Wed, 9 Dec 2020 16:39:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4361523BDF for ; Wed, 9 Dec 2020 16:39:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4361523BDF 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 CD1858D001E; Wed, 9 Dec 2020 11:39:58 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C81CC6B00F8; Wed, 9 Dec 2020 11:39:58 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B72278D001E; Wed, 9 Dec 2020 11:39:58 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0168.hostedemail.com [216.40.44.168]) by kanga.kvack.org (Postfix) with ESMTP id A15496B00F7 for ; Wed, 9 Dec 2020 11:39:58 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 4FBE934A3 for ; Wed, 9 Dec 2020 16:39:58 +0000 (UTC) X-FDA: 77574305676.06.view78_361722a273f1 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin06.hostedemail.com (Postfix) with ESMTP id 0B63F10049A70 for ; Wed, 9 Dec 2020 16:39:58 +0000 (UTC) X-HE-Tag: view78_361722a273f1 X-Filterd-Recvd-Size: 2611 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf09.hostedemail.com (Postfix) with ESMTP for ; Wed, 9 Dec 2020 16:39:57 +0000 (UTC) From: Will Deacon Authentication-Results: mail.kernel.org; dkim=permerror (bad message/signature format) To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, Will Deacon , Catalin Marinas , Jan Kara , Minchan Kim , Andrew Morton , "Kirill A . Shutemov" , Linus Torvalds , Vinayak Menon , kernel-team@android.com Subject: [PATCH 0/2] Create 'old' ptes for faultaround mappings on arm64 with hardware access flag Date: Wed, 9 Dec 2020 16:39:48 +0000 Message-Id: <20201209163950.8494-1-will@kernel.org> X-Mailer: git-send-email 2.20.1 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: Hi folks, This series allows architectures to opt-in at runtime for faultaround mappings to be created as 'old' instead of 'young'. Although there have been previous attempts at this, they failed either because the decision was deferred to userspace [1] or because it was done unconditionally and shown to regress benchmarks for particular architectures [2]. Since this patch has demonstrated considerable benefits for arm64-based Android devices with hardware access flag capabilities, patch two enables this functionality there. Cheers, Will [1] https://www.spinics.net/lists/linux-mm/msg143831.html [2] 315d09bf30c2 ("Revert "mm: make faultaround produce old ptes"") Cc: Catalin Marinas Cc: Jan Kara Cc: Minchan Kim Cc: Andrew Morton Cc: Kirill A. Shutemov Cc: Linus Torvalds Cc: Vinayak Menon Cc: Andrew Morton Cc: --->8 Will Deacon (2): mm: Allow architectures to request 'old' entries when prefaulting arm64: mm: Implement arch_wants_old_faultaround_pte() arch/arm64/include/asm/cpufeature.h | 12 +++++++++++ arch/arm64/include/asm/pgtable.h | 8 +++++++- include/linux/mm.h | 5 ++++- mm/memory.c | 31 ++++++++++++++++++++++++++--- 4 files changed, 51 insertions(+), 5 deletions(-)