From patchwork Fri Jan 8 17:15:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 12007061 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=-11.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 AF605C433DB for ; Fri, 8 Jan 2021 17:15:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 249C423A1C for ; Fri, 8 Jan 2021 17:15:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 249C423A1C 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 6119D6B02A9; Fri, 8 Jan 2021 12:15:31 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 59B5E6B02AB; Fri, 8 Jan 2021 12:15:31 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 463E56B02AC; Fri, 8 Jan 2021 12:15:31 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0131.hostedemail.com [216.40.44.131]) by kanga.kvack.org (Postfix) with ESMTP id 29FA36B02A9 for ; Fri, 8 Jan 2021 12:15:31 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id E833A12E7 for ; Fri, 8 Jan 2021 17:15:30 +0000 (UTC) X-FDA: 77683259220.06.burst05_2e1605e274f4 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin06.hostedemail.com (Postfix) with ESMTP id BF7F71009707D for ; Fri, 8 Jan 2021 17:15:30 +0000 (UTC) X-HE-Tag: burst05_2e1605e274f4 X-Filterd-Recvd-Size: 3890 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf44.hostedemail.com (Postfix) with ESMTP for ; Fri, 8 Jan 2021 17:15:30 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 126172396F; Fri, 8 Jan 2021 17:15:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610126129; bh=YhR6DyJ6oSXaH8kGg7Rrar6eHVmLXFUyvbhiZEytVM0=; h=From:To:Cc:Subject:Date:From; b=ro6hxY1P1RL8dsSv1xyCOQy+ixIxUkdshRdTRxE/tyhfzxg3hlA1fAKjJ+oZLrnQ1 pfk375zMP1ER8q4+pElBswPKJ4R9KZFL9/F5MFDmPl6yTNO+2WdvnOf3PqRDVV8rB9 7XqMotEh4KRpLyIRVlElPUlTSenZu4pThQwvVUgwpG2JsVlnhyQnIA58C9DiPDAOe5 01I8XmWPPlWFl1buFeG/SFJxE+pFV0US0cs6rqpaZZP826GMgS0HTnng6nWl7dJV3b kFbyCPF9W2NSvUNmdHnKwY+ZLiXMyg02Uo0FKHgOQ5eIkWs4n69esukrAawUMmxZ+I nBPHc7c2MqfWQ== From: Will Deacon 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 , Hugh Dickins , kernel-team@android.com Subject: [PATCH v2 0/3] Create 'old' ptes for faultaround mappings on arm64 with hardware access flag Date: Fri, 8 Jan 2021 17:15:14 +0000 Message-Id: <20210108171517.5290-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 all, This is version two of the series I originally posted here: https://lore.kernel.org/r/20201209163950.8494-1-will@kernel.org The patches allow 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]. The big difference in this version is that I have reworked it based on Kirill's patch which he posted as a follow-up to the original. However, I can't tell where we've landed on that -- Linus seemed to like it, but Hugh was less enthusiastic. I think that my subsequent patches are an awful lot cleaner after the rework, but I don't think I necessarily depend on everything in there so if that patch is likely to be a sticking point then I can try to extract the parts I need. Feedback welcome. 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: Hugh Dickins Cc: --->8 Kirill A. Shutemov (1): mm: Cleanup faultaround and finish_fault() codepaths Will Deacon (2): mm: Allow architectures to request 'old' entries when prefaulting arm64: mm: Implement arch_wants_old_prefaulted_pte() arch/arm64/include/asm/pgtable.h | 12 +- fs/xfs/xfs_file.c | 6 +- include/linux/mm.h | 17 ++- include/linux/pgtable.h | 11 ++ mm/filemap.c | 181 +++++++++++++++++++------ mm/memory.c | 219 +++++++++++-------------------- 6 files changed, 251 insertions(+), 195 deletions(-)