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=-5.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 F276DC433E0 for ; Mon, 11 Jan 2021 13:31:53 +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 A7129221EC for ; Mon, 11 Jan 2021 13:31:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A7129221EC 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:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=awnrmsm1cQglzI1DCsWLzouRinTE0ILGDL31uB7IFDg=; b=GPxXux/KyuVzgDkgOXwP7dVy/ 8p8Nb06k0ybdvuQCa8dtIvNXUC1KPVOIQYjbrhSgtetp5xwwB3YmzilhJSykzQKehOUBt44/Akr+q jDSCA1SZQA00EaNcm15exeXyPiErNEnrTT7u2jHvZpTS/85Htqa0KEeVUEWD/48rCWmlyOE0GN1Vh 6n6wGu71s0ok1IcC3eG/KWN1N3qm4TzG/HPaYIGll7T81/PVIV0uwugUTnWNBhgD8bScvHsO/xkbu c9Ay3bys+q/ki7Ayv84554kjUmJABSnT4+1XOH1wWdBuniV7CHCOAf7fqDunbbI1+ieanvIiQYuI0 HuPq3RBnQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kyxH3-0004TM-6O; Mon, 11 Jan 2021 13:30:21 +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 1kyxGw-0004R7-9i for linux-arm-kernel@lists.infradead.org; Mon, 11 Jan 2021 13:30:15 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 81C82221FF; Mon, 11 Jan 2021 13:30:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610371813; bh=9u2HWgUS7+SBF2cXUUEJwwSvQMwtFkX8ve6mtxwTAK0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=i33J0sYvklsC5LMvdOiZUD222Ye0+QMPyCyLIs77djWJf8gtM9OjQJD7ZUVdeco7C oLud5b0oRQ3ocbVbqoWB0rrbZhNnejHE0an6HIOIpJaMlBybFr2Wtq94iCJqXaEjJ5 G5INIwpk5ke9G6Ww2eGWRmXHfhd5rkfD0odRytJRMcM82dPrMxSmcx0kc/0bcLPqsX XO2YRb4YZDg87YDFkl8lFlVP1DnbLMggGPL0gY9Bc4bj5ncNkDPQ25Q4v0bTHL5GWg Ue7LcULTBfONfDe4SFGPKNax/ecxXFN7zbtaZ4Tg6LStZiDjWagL3ONBsc1VCthFFC wZRs9Kj8n2aqQ== Date: Mon, 11 Jan 2021 13:30:08 +0000 From: Will Deacon To: Linus Torvalds Subject: Re: [PATCH v2 0/3] Create 'old' ptes for faultaround mappings on arm64 with hardware access flag Message-ID: <20210111133007.GA7642@willie-the-truck> References: <20210108171517.5290-1-will@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210111_083014_461413_8A18723A X-CRM114-Status: GOOD ( 22.30 ) 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: Jan Kara , Minchan Kim , Catalin Marinas , Hugh Dickins , Linux Kernel Mailing List , Linux-MM , Vinayak Menon , "Kirill A . Shutemov" , Andrew Morton , Android Kernel Team , Linux ARM 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 On Fri, Jan 08, 2021 at 11:34:08AM -0800, Linus Torvalds wrote: > On Fri, Jan 8, 2021 at 9:15 AM Will Deacon wrote: > > > > 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. > > Yeah, I like it, but I have to admit that it had a disturbingly high > number of small details wrong for several versions. I hope you picked > up the final version of the code. I picked the version from here: https://lore.kernel.org/r/20201229132819.najtavneutnf7ajp@box and actually, I just noticed that willy spotted a typo in a comment, so I'll fix that locally as well as adding the above to a 'Link:' tag for reference. > At the same time, I do think that the "disturbingly high number of > issues" was primarily exactly _because_ the old code was so > incomprehensible, and I think the end result is much cleaner, so I > still like it. > > >I think that my subsequent patches are an > > awful lot cleaner after the rework > > Yeah, I think that's a side effect of "now the code really makes a lot > more sense". Your subsequent patches 2-3 certainly are much simpler > now, although I'd be inclined to add an argument to "do_set_pte()" > that has the "write" and "pretault" bits in it, instead of having to > modify the 'vmf' structure. I played with a few different ways of doing this, but I can't say I prefer them over what I ended up posting. Having a bunch of 'bool' arguments makes the callers hard to read and brings into question what exactly vmf->flags is for. I also tried adding a separate 'address' parameter so that vmf->address is always the real faulting address, but 'address' is the thing to use for the pte (i.e. prefault is when 'address != vmf->address'). That wasn't too bad, but it made the normal finish_fault() case look weird. So I think I'll leave it as-is and see if anybody wants to change it later on. Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel