Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp553635pxb; Fri, 8 Jan 2021 11:37:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJyH2iCxZ+LDT6O9LGX8Tym+/PUsF8VKSQNbNb06qlq1I76nfvnC7Xlwh2mkqF+lLbgqgvtL X-Received: by 2002:a05:6402:1ac4:: with SMTP id ba4mr6252038edb.383.1610134639255; Fri, 08 Jan 2021 11:37:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610134639; cv=none; d=google.com; s=arc-20160816; b=DI+kS2+SvtZ0UMerfMLwEtER89WB1Ag9F2pxRr8y/F7qnENmuBVwhttLOHmSOTdnGe xgLsq0vIO+B7ah4ZyXaiCkqMyPc795KXbjDRyiLv+o/iFXNsCzZrVpB60PshZ+egBrpT NYTWPodnYMZ6YTH/MnHL7JYBxTk4Qn2ePeybnYJ8xhgtW5jvJCoQ8x+lg6q+5siv6j2e Y8+rcNg/09DEnrLIZr9sEIYAnkDffJ8C77Jfx/Kp4LDiGUxtbL2/JQWZwIo89N91Sv6M hvHtukP8vl2Ii78hM1jSTXh2nr2QPsw0qyawCEeg52X5ZAF5TSWrr3cj4pZOntgVzRwR OPWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=t+MJWRxDTU36V8xE19m5WjjSjbefnbmENuppDaMSAKg=; b=xp42G+prSov4UYWjD7zKM43IamylEN01pPiZFOyts9UbLGGfNEZWtg20Xwx1BrTc3U WFt1YyolKBfhtuvZQ0ZCE5AzC13OIkCodW0G2W/Nxnjl0/Aj417BjfCbzq+XTnymhBaE QIFgzkKb1a0br0EBV9YfupNGJCSlvQVXEelJulzuNuMvp7JeFpc43B6cWsxy46zirdrv LKYeXMOocMNef4D4PXhVz4uthImW+wBClr3h2XTLFqOQ4cgShQwcH0fr00NOrLD/u4kC 0RBc1zqq4qgB6cHkAtDqTE3fflTi0bn6GIqM69FLVb/hJPE4M5HpDCAq43fBkb02Ad7I k6uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=WhBZKnik; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jg3si2237212ejc.744.2021.01.08.11.36.55; Fri, 08 Jan 2021 11:37:19 -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=@linux-foundation.org header.s=google header.b=WhBZKnik; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728724AbhAHTfI (ORCPT + 99 others); Fri, 8 Jan 2021 14:35:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728591AbhAHTfI (ORCPT ); Fri, 8 Jan 2021 14:35:08 -0500 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EE4BC061380 for ; Fri, 8 Jan 2021 11:34:28 -0800 (PST) Received: by mail-lf1-x129.google.com with SMTP id o19so25642920lfo.1 for ; Fri, 08 Jan 2021 11:34:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=t+MJWRxDTU36V8xE19m5WjjSjbefnbmENuppDaMSAKg=; b=WhBZKnikJ7D+9OF0OeU9baHQ4dnixiMFFXPibHM5X49KiX9Ewm7jxNN5GWUiTkR5xU /Ai8HlPNgCtZp7Y6PHdYR0cKx3eNJ6hyPyLd/NXT/eNP/2htauiFUzovR6ePM0cZ32sN zrEq5XGLLpxSteRwMBBZP5CMTtHvGKLevDWuo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=t+MJWRxDTU36V8xE19m5WjjSjbefnbmENuppDaMSAKg=; b=DIUNnDI+t2hWGYAWwSH8Teo5nPGAFwsJDNaMSW/7eUbkAgWN5401Fx8T2uwIQ09snz 0tBFI2blEj4CIau0cDPx2+eGzRvCuMk9c34L42gqT5S0v6v3Uhrxu/R5OiomMWXCasAR FotlTA0rai86pdF76hQzTLU0drcb/zLTbDsmL7Eq7ugcrQd2wdwueryFKnrtogHfIV92 GnFNBmz9Aca1jGnTI4AD4ip0l4dn5YmVD941X/PuadCMidndhbNriSM88uu4ZQhHVW8m Yvcb/LZEJoyNQ3MZdDo/QhuHGtGME5L+bfZPo76meKzEgGJu/rhT4rHYWXwIlBzOBVZL IRYw== X-Gm-Message-State: AOAM530VSexTcOxTRHSifShvC86od0ldVkpV+z2884q9D5pbygtDIG3H D//NB93hjh1doGf7zTPuFdzJSTiGRcXm7Q== X-Received: by 2002:a05:6512:3e7:: with SMTP id n7mr2122766lfq.585.1610134466154; Fri, 08 Jan 2021 11:34:26 -0800 (PST) Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com. [209.85.167.42]) by smtp.gmail.com with ESMTPSA id h23sm2306807ljh.115.2021.01.08.11.34.25 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 08 Jan 2021 11:34:25 -0800 (PST) Received: by mail-lf1-f42.google.com with SMTP id m12so25590848lfo.7 for ; Fri, 08 Jan 2021 11:34:25 -0800 (PST) X-Received: by 2002:a2e:9ad7:: with SMTP id p23mr2022603ljj.465.1610134464854; Fri, 08 Jan 2021 11:34:24 -0800 (PST) MIME-Version: 1.0 References: <20210108171517.5290-1-will@kernel.org> In-Reply-To: <20210108171517.5290-1-will@kernel.org> From: Linus Torvalds Date: Fri, 8 Jan 2021 11:34:08 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 0/3] Create 'old' ptes for faultaround mappings on arm64 with hardware access flag To: Will Deacon Cc: Linux Kernel Mailing List , Linux-MM , Linux ARM , Catalin Marinas , Jan Kara , Minchan Kim , Andrew Morton , "Kirill A . Shutemov" , Vinayak Menon , Hugh Dickins , Android Kernel Team Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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 still dislike how we basically randomly modify the information in that 'vmf' thing. That said, now it's just a small detail - not really objectionable, just a "this could be cleaner, I think". I think it was Kirill who pointed out that we sadly cannot make 'vmf' read-only anyway, because it does also contain those pre-allocation details etc (vmf->pte etc) that are very much about what the current "state" of the fault is. So while I would hope it could be more read-only than it is, my wish that it could _actually_ be 'const' is clearly just an irrelevant dream. Linus