Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp462659pxb; Fri, 8 Jan 2021 09:17:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJyUEhdQizjLNsFUdSfMsDXUfRQJoCUDs9BV6HcmRAku4zwO/xrAS1WcCIuC6FXT+ZHqhkZP X-Received: by 2002:aa7:d407:: with SMTP id z7mr6353046edq.234.1610126255782; Fri, 08 Jan 2021 09:17:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610126255; cv=none; d=google.com; s=arc-20160816; b=Ggot6UxQitKXbPN0jRTeZmm1xc4D+GJYZ1sUb6TpAEZNgP5cV3/pPH2n3d70ll2KBr xO3MT3Q5jWtcq+XcsR8SgANiyd3PqhtNGZ4dF3S2yekytyPRLT/Hsg/YuEIaynb7cJps mRkL1NDRgXMHQVEs+8xXdYGRWBR1XW1+dwzqTDAgjp/HfcYItcvLgKUBcVKlVWEqBoQp OsGe413xh6MO0NgwrwDSo/CIXC8ZsETRbINU6D2wimaxDlh2VvX2DiJ+Nw8yFeNfpPp3 nU++meXpqYUv/o2LeblZmRJ6XXJqSj2J4LMvQE4Ddj56brIxS4XbAjahnlgY6rUJ7aKs LGpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=6Z5Rg5+Ia0KlQZvkmKa2HH7/C6LNog40BwTTenRw8VM=; b=liOfA+CAUGQSq5ANizCi0MG19yH0wY4N0kPU+EXPXuJ1Ms6pjeR8c84U7luXzfGmIf IhCJ4GyEZFQ5HW6PnCW7UWKnm5qGEWpTuPzAgovwjimtUBPJUSecf8Bejw4o8mwyDkdX ZtgXKperwwCrU0KqseaafaHdackCYEhdAWXa5GQ4E6xDs35bq/rARWHI8OEL0hDmIPUN T4cQGFHNeTC2robDUxuV5BIeOlbyUdGdtj6Uu5woHYV0L3rrr1BHFpykKWz7MhZPrxEt 141haJy7ZWYKQaQY8OP/S9iKcqgi//zLfTxY+IKddrnaX8dMy924JLlYtONC7x9hTSpA YwLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ro6hxY1P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z6si3612528ejw.244.2021.01.08.09.17.10; Fri, 08 Jan 2021 09:17:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ro6hxY1P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728092AbhAHRQK (ORCPT + 99 others); Fri, 8 Jan 2021 12:16:10 -0500 Received: from mail.kernel.org ([198.145.29.99]:50570 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727471AbhAHRQJ (ORCPT ); Fri, 8 Jan 2021 12:16:09 -0500 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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.29.2.729.g45daf8777d-goog