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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id AB755C433F5 for ; Tue, 1 Feb 2022 08:58:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 16DF78D005D; Tue, 1 Feb 2022 03:58:19 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 11D228D0054; Tue, 1 Feb 2022 03:58:19 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 00A958D005D; Tue, 1 Feb 2022 03:58:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0154.hostedemail.com [216.40.44.154]) by kanga.kvack.org (Postfix) with ESMTP id E5AAE8D0054 for ; Tue, 1 Feb 2022 03:58:18 -0500 (EST) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 9237B96F11 for ; Tue, 1 Feb 2022 08:58:18 +0000 (UTC) X-FDA: 79093609476.07.2F3DB14 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf12.hostedemail.com (Postfix) with ESMTP id 2C6C740003 for ; Tue, 1 Feb 2022 08:58:18 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 7CFEEB82AD7; Tue, 1 Feb 2022 08:58:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7FAC2C340F3; Tue, 1 Feb 2022 08:58:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643705895; bh=r7eAvwcNoIC4Kqf/puxztITN9gelFA2bWYzMxyTBcqk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FUTn9VwBJk+gowjJncdfhI8YXGOVVoIvmYE9IzQqC9cdhW/cMO+e5VqWM30haDrIc U3FgJjjUJTNCNrZRZahJLZgeI0tlOZip0xbbil5ZXBz/XnAPlEHP+aSpYFeioDK5aS 3UY6EvPW3KtfatgAcmH3fEr1POVlk/KY/BZ7CD10WiX4vSdFlOR52JYAgs4YrGkw7a SRNG6rdPTssNKdXJmV14poc8ykiZcLknTdUDl8RRqOQWONsZTc7o4jATs5pHejPjJg 0aHc1ERZGT5SwWzdSSfYoIB3pwTAYz5/zFk6+Em53I4ru4ulTd0eT9MvNu1Gj+7FpI Re/uASIcXallw== Date: Tue, 1 Feb 2022 10:58:03 +0200 From: Mike Rapoport To: Michel Lespinasse Cc: Linux-MM , linux-kernel@vger.kernel.org, Andrew Morton , kernel-team@fb.com, Laurent Dufour , Jerome Glisse , Peter Zijlstra , Michal Hocko , Vlastimil Babka , Davidlohr Bueso , Matthew Wilcox , Liam Howlett , Rik van Riel , Paul McKenney , Song Liu , Suren Baghdasaryan , Minchan Kim , Joel Fernandes , David Rientjes , Axel Rasmussen , Andy Lutomirski Subject: Re: [PATCH v2 33/35] arm64/mm: attempt speculative mm faults first Message-ID: References: <20220128131006.67712-1-michel@lespinasse.org> <20220128131006.67712-34-michel@lespinasse.org> <20220131080729.GA785@lespinasse.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220131080729.GA785@lespinasse.org> X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 2C6C740003 X-Rspam-User: nil Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=FUTn9VwB; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf12.hostedemail.com: domain of rppt@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=rppt@kernel.org X-Stat-Signature: sbe8cfy4phfoyobcx7m8eb3bhdm3ms3i X-HE-Tag: 1643705898-574500 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: On Mon, Jan 31, 2022 at 12:07:29AM -0800, Michel Lespinasse wrote: > On Sun, Jan 30, 2022 at 11:13:26AM +0200, Mike Rapoport wrote: > > The speculative page fault implementation here (and for PowerPC as well) > > looks very similar to x86. Can we factor it our rather than copy 3 (or > > more) times? > > In each arch, the speculative code was written along the lines of the > existing non-speculative code, so that behavior would be unchanged > when speculation succeeds. > > Now each arch's existing, non-speculative code paths are quite similar, > but they do have small differences as to how they implement various > permission checks, protection keys and the like. The same small > differences end up being reflected in the new speculative code paths. > > I agree it would be nice if this code could be unified between archs, > but IMO this should start with the existing non-speculative code - > I don't think it would make sense to try unifying the new speculative > code while trying to follow the behavior of the non-unified old > non-speculative code paths... Then maybe this unification can be done as the ground work for the speculative page fault handling? -- Sincerely yours, Mike.