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=-17.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 D1455C433DB for ; Wed, 20 Jan 2021 17:39:06 +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 7BB96207C4 for ; Wed, 20 Jan 2021 17:39:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7BB96207C4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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: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=FsVFiRGkmOr78fm16o8zWtg32ZLMPr3OFPfGu+v8GHk=; b=Rynllu36awCZ6V22YPOfmSkS4l /g1lJmtJaKDe0/2+m2V3W2HkhL6+pD8TIsunBlGnxfoMySWwRwFiv1cCyQvmZK8CWfJgoO591AHrG Yc4MtX6H6cAyj/THZnXmfA3MPOhrltlNfQO/eXnOeR1PpzQ9HYGEf9vJsInBD6CrM7wt9o5LISpyg i7U4Rduoy/50qFJBvUj5DHb/hOcZzb4Vy014dETXdc6G4rAGRIJGO/edSjYrkwCb0HkAa8TEatrWo j9+QBv+CSZDE8qt7oc7cJAn6IowR1qNLj7gwibKN5RnOADy+o9YkcR8UG7+qCKu0et1G7BDAORJR2 bAFlGtKQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2HP9-00023B-5E; Wed, 20 Jan 2021 17:36:27 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2HP5-00022E-FT for linux-arm-kernel@lists.infradead.org; Wed, 20 Jan 2021 17:36:24 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id E2365233ED; Wed, 20 Jan 2021 17:36:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1611164182; bh=fsx985f1cF1hEHYZaVWNKqVRb18Pc9UFt6saI96uias=; h=From:To:Cc:Subject:Date:From; b=DVUl+Max0jMmGMvXzEUIQcLVFWxcdykdPnqhw3tSjJWuPNP6+yLq5ZNhba6P0Bz7J M1j/Ht6EVoWncHRlcuTGxP6rdSsOBDFAbLfXbRSfXbb1naFji20egWauJE1r/YliEq dRzkLRkK0hGfHpS9gf0DJzaaale4w5jcprkHkKTMRR+QD/jY0VVfWq995pzMCCTGUP qZckjFa4k4jgFWF3tPFPiMjLb9Q2bqTTqSOiEZF81t83y6rQ/rsB72EBm/UVWOmihJ 6aXG5TTaV+mPmVuneIwZcWANOl08n+uZ82diqbwOPp4ZC55Cyk3Qmu4w2TbByj0BAj 8twZRX2B5Ynhw== From: Will Deacon To: linux-kernel@vger.kernel.org Subject: [PATCH v4 0/8] Create 'old' ptes for faultaround mappings on arm64 with hardware access flag Date: Wed, 20 Jan 2021 17:36:04 +0000 Message-Id: <20210120173612.20913-1-will@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210120_123623_807383_290D041E X-CRM114-Status: GOOD ( 12.27 ) 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: Nick Desaulniers , kernel-team@android.com, Jan Kara , Minchan Kim , Catalin Marinas , Linus Torvalds , Hugh Dickins , linux-mm@kvack.org, Vinayak Menon , "Kirill A . Shutemov" , Andrew Morton , Will Deacon , linux-arm-kernel@lists.infradead.org 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 Hi all, This is version four of the patches I previously posted here: v1: https://lore.kernel.org/r/20201209163950.8494-1-will@kernel.org v2: https://lore.kernel.org/r/20210108171517.5290-1-will@kernel.org v3: https://lore.kernel.org/r/20210114175934.13070-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 change since v3 is that the immutable fields of 'struct vm_fault' now live in a 'const' anonymous struct. Although Clang will silently accept modifications to these fields [3], GCC emits an error. The resulting diffstat is _considerably_ more manageable with this approach. As before, I've also updated this branch: https://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git/log/?h=faultaround Cheers, Will [1] https://www.spinics.net/lists/linux-mm/msg143831.html [2] 315d09bf30c2 ("Revert "mm: make faultaround produce old ptes"") [3] https://bugs.llvm.org/show_bug.cgi?id=48755 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: Nick Desaulniers Cc: --->8 Kirill A. Shutemov (1): mm: Cleanup faultaround and finish_fault() codepaths Will Deacon (7): mm: Allow architectures to request 'old' entries when prefaulting arm64: mm: Implement arch_wants_old_prefaulted_pte() mm: Move immutable fields of 'struct vm_fault' into anonymous struct mm: Pass 'address' to map to do_set_pte() and drop FAULT_FLAG_PREFAULT mm: Avoid modifying vmf.address in __collapse_huge_page_swapin() mm: Use static initialisers for immutable fields of 'struct vm_fault' mm: Mark anonymous struct field of 'struct vm_fault' as 'const' arch/arm64/include/asm/pgtable.h | 12 +- fs/xfs/xfs_file.c | 6 +- include/linux/mm.h | 25 ++-- include/linux/pgtable.h | 11 ++ mm/filemap.c | 178 ++++++++++++++++++------ mm/khugepaged.c | 37 +++-- mm/memory.c | 223 +++++++++++-------------------- mm/shmem.c | 6 +- mm/swapfile.c | 11 +- 9 files changed, 280 insertions(+), 229 deletions(-) -- 2.30.0.284.gd98b1dd5eaa7-goog _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel