Received: by 2002:a05:6358:795:b0:dc:4c66:fc3e with SMTP id n21csp867822rwj; Sat, 29 Oct 2022 12:16:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6myADnhjGXm6Bc5yZPYW1/PGg6JbobHcZ6RTNOmRivcJiRPKfloSSOh5hMvUu6L84Je+0P X-Received: by 2002:a17:903:1207:b0:185:4042:23d2 with SMTP id l7-20020a170903120700b00185404223d2mr5598676plh.143.1667071017472; Sat, 29 Oct 2022 12:16:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667071017; cv=none; d=google.com; s=arc-20160816; b=oAY5jcArelThzh82hCr58uA/nByAirb4xLBod2/S1NwSSZ6EBh8tM2TUoN299Iz7ow S2Ud3Meig4fsx7MzpoSZn5WgiGoVl+fo9XA+PYOnS+EQxLgEVn/vbu56D1Qa7KkdZfQh 8HMWBpU7Lq0leHv94BhxtL9Hxqx7gIzTSqwYRzLhnQNI8/6FX/47gV02GojCuBT9OIoW Szsi4qyo2GoiFgXwYVq/xHnXtUoXKvQPwmPKHhVC4WxmaQSoLaxdJxoKoUUwxEX+qcBp bkQnQ+CELNdJsIsvxJYqVwYGoapeYuKlr79NJm9hqCxlwnKplyRh8p8NssodA+AyoRuu Mt0g== 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=5uRddk1XhPNwTbBKrtNsMzzHTVeM6YJR5m/QC6x39Jk=; b=nu4LUk8ReWOOhmWVicnUuyf37purHy9Y9ke64ZRFUiWuzWE/6+0xXQN2KcmN+BvdUA Smb9MouXWoFnrexpZvsFVbrm3HZamv9Q6iXELfpyIt1xuNZZpWCpdTjGqByHTTTn8qi1 P/lqzX0KHcXSS6Jmdv1mfTV14EGTAnHyXojII8HVvDTmsOrp7yi6fWRz3Oude9XGmMP4 BvP9WFZM2IXnBT/e0hS5+DJ+FiypULSRVDXvzk7V5MdE0aKcAjqeJ5SSQpLpX9jKgnKC xBjIILLpLFe+91cdPSiopxmXmlMpPmU107w5MTM5BlY7qU7woCu/T05MtXb3D0952O52 nVEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=cwBNRbyw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p11-20020a170902e74b00b0018663949529si3321537plf.162.2022.10.29.12.16.41; Sat, 29 Oct 2022 12:16:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=cwBNRbyw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229642AbiJ2S6o (ORCPT + 99 others); Sat, 29 Oct 2022 14:58:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229553AbiJ2S6n (ORCPT ); Sat, 29 Oct 2022 14:58:43 -0400 Received: from mail-qv1-xf35.google.com (mail-qv1-xf35.google.com [IPv6:2607:f8b0:4864:20::f35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C329CE16 for ; Sat, 29 Oct 2022 11:58:42 -0700 (PDT) Received: by mail-qv1-xf35.google.com with SMTP id ml12so6154884qvb.0 for ; Sat, 29 Oct 2022 11:58:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=5uRddk1XhPNwTbBKrtNsMzzHTVeM6YJR5m/QC6x39Jk=; b=cwBNRbywwPuWcgn+utMsaxZ7GzG3TjQ8j+X3H7yQwI78qcapdmP+GWFc/LkE+MlqOg 5lCFZiobjugZggO/0zYwPAU7tPwwQd6vQiCIbJYY0FQ6NNHHnX0W7Iz5c/fw0cehI3MD ldWqc9M/kJ9RuvtXKCyeVAiOTn9hMFM54Air4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=5uRddk1XhPNwTbBKrtNsMzzHTVeM6YJR5m/QC6x39Jk=; b=wonictAV2DhP6gr8rLX21/0oRgnwN+/UyrolfMtcK7f+w6/rXUEIWUfmxaRvMMY9jT LmsixIXEZ4bz0ufZxHZ0x6kXn4icYgpxjM9ktSR84olO8JhtO8Gmc1GOoFg7ggjsJV0g IbfKqSbQuU6iY11YfOu2Zkom/EpgciCtpC2HldVkmhX4lxhy/yWsh3DcW23yzTFjqLm5 Lil9qmW8uvsknhKQe0XryB9I5M84/jiGz1b5UPlHAtuMH8kIqdhV81/PN0K5AKPX6/f0 34B9glPgObSb+XRC7WaSGfcDNrWSU+t8+GFLXMqY36zfiCUQ0RSm/jjXeZyHkc+8OP/b cH/A== X-Gm-Message-State: ACrzQf0NsQcSWsLZUQGYoUQfUsViD+K7d5azTiKT+nBEO9To39qpE5jZ bnmMmPDXMdkUIV7YxPywoAFc5mac2Cw2yw== X-Received: by 2002:a05:6214:f68:b0:4bb:b301:51aa with SMTP id iy8-20020a0562140f6800b004bbb30151aamr4599973qvb.11.1667069920982; Sat, 29 Oct 2022 11:58:40 -0700 (PDT) Received: from mail-yb1-f177.google.com (mail-yb1-f177.google.com. [209.85.219.177]) by smtp.gmail.com with ESMTPSA id i3-20020a05620a248300b006ee9d734479sm1551464qkn.33.2022.10.29.11.58.39 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 29 Oct 2022 11:58:40 -0700 (PDT) Received: by mail-yb1-f177.google.com with SMTP id y72so9544953yby.13 for ; Sat, 29 Oct 2022 11:58:39 -0700 (PDT) X-Received: by 2002:a05:6902:702:b0:6ca:a588:2904 with SMTP id k2-20020a056902070200b006caa5882904mr4869775ybt.571.1667069919675; Sat, 29 Oct 2022 11:58:39 -0700 (PDT) MIME-Version: 1.0 References: <20221022111403.531902164@infradead.org> <20221022114424.515572025@infradead.org> <2c800ed1-d17a-def4-39e1-09281ee78d05@nvidia.com> <6C548A9A-3AF3-4EC1-B1E5-47A7FFBEB761@gmail.com> <47678198-C502-47E1-B7C8-8A12352CDA95@gmail.com> In-Reply-To: From: Linus Torvalds Date: Sat, 29 Oct 2022 11:58:23 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 01/13] mm: Update ptep_get_lockless()s comment To: Nadav Amit Cc: Peter Zijlstra , Jann Horn , John Hubbard , X86 ML , Matthew Wilcox , Andrew Morton , kernel list , Linux-MM , Andrea Arcangeli , "Kirill A . Shutemov" , jroedel@suse.de, ubizjak@gmail.com, Alistair Popple Content-Type: multipart/mixed; boundary="000000000000613b9e05ec30f698" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --000000000000613b9e05ec30f698 Content-Type: text/plain; charset="UTF-8" On Sat, Oct 29, 2022 at 11:36 AM Linus Torvalds wrote: > > Anyway, I think the best documentation for "this is what I meant" is > simply the patch. Does this affect your PoC on your setup? Here's a slightly cleaned up set with preliminary commit messages, and an explanation for why some of the 'struct page' declarations were moved around a bit in case you wondered about that part of the change in the full patch. The end result should be the same, so if you already looked at the previous unified patch, never mind. But this one tries to make for a better patch series. Still not tested in any way, shape, or form. I decided I wanted to send this one before booting into this and possibly blowing up ;^) Linus --000000000000613b9e05ec30f698 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-mm-zap_page_range-narrow-down-page-variable-scope.patch" Content-Disposition: attachment; filename="0001-mm-zap_page_range-narrow-down-page-variable-scope.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_l9uacw420 RnJvbSA4Y2FjYTZhOTNlYmUzYjBlNGFkYWJmYjFiOGQxM2U4NmQ0MWZkMzI5IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBMaW51cyBUb3J2YWxkcyA8dG9ydmFsZHNAbGludXgtZm91bmRh dGlvbi5vcmc+CkRhdGU6IFNhdCwgMjkgT2N0IDIwMjIgMTA6NDI6MjUgLTA3MDAKU3ViamVjdDog W1BBVENIIDEvMl0gbW06IHphcF9wYWdlX3JhbmdlOiBuYXJyb3cgZG93biAncGFnZScgdmFyaWFi bGUgc2NvcGUKCldlJ3JlIHVzaW5nIHRoZSBzYW1lICdzdHJ1Y3QgcGFnZSAqcGFnZScgdmFyaWFi bGUgZm9yIHRocmVlIHZlcnkKZGlzdGluY3QgY2FzZXMuICBUaGF0IHdvcmtzIGFuZCB0aGUgY29t cGlsZXIgZG9lcyB0aGUgcmlnaHQgdGhpbmcsIGJ1dApJJ20gYWJvdXQgdG8gYWRkIHNvbWUgcGFn ZS1yZWxhdGVkIGF0dHJpYnV0ZXMgdGhhdCBvbmx5IGFmZmVjdHMgb25lIG9mCnRoZW0sIHNvIGxl dCdzIG1ha2UgdGhlIHdob2xlICJ0aGVzZSBhcmUgcmVhbGx5IGRpZmZlcmVudCB1c2VzIgpleHBs aWNpdC4KClNpZ25lZC1vZmYtYnk6IExp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613b9e05ec30f698 Content-Type: text/x-patch; charset="US-ASCII"; name="0002-mm-make-sure-to-flush-TLB-before-marking-page-dcirty.patch" Content-Disposition: attachment; filename="0002-mm-make-sure-to-flush-TLB-before-marking-page-dcirty.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_l9uad8961 RnJvbSA4NmQxYTM4MDdjMDEzYWJjYTcyMDg2Mjc4ZDkzMDhlMzk4ZTdiNDFkIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBMaW51cyBUb3J2YWxkcyA8dG9ydmFsZHNAbGludXgtZm91bmRh dGlvbi5vcmc+CkRhdGU6IFNhdCwgMjkgT2N0IDIwMjIgMTE6NDU6MDcgLTA3MDAKU3ViamVjdDog W1BBVENIIDIvMl0gbW06IG1ha2Ugc3VyZSB0byBmbHVzaCBUTEIgYmVmb3JlIG1hcmtpbmcgcGFn ZSBkY2lydHkKCldoZW4gd2UgcmVtb3ZlIGEgcGFnZSB0YWJsZSBlbnRyeSwgd2UgYXJlIHZlcnkg Y2FyZWZ1bCB0byBvbmx5IGZyZWUgdGhlCnBhZ2UgYWZ0ZXIgd2UgaGF2ZSBmbHVzaGVkIHRoZSBU TEIsIGJlY2F1c2Ugb3RoZXIgQ1BVJ3MgY291bGQgc3RpbGwgYmUKdXNpbmcgdGhlIHBhZ2UgdGhy b3VnaCBzdGFsZSBUTEIgZW50cmllcyB1bnRpbCBhZnRlciB0aGUgZmx1c2guCgpIb3dldmVyLCB3 ZSBtYXJrIHRoZSB1bmRlcmx5aW5nIHBhZ2UgZGlydHkgaW1tZWRpYXRlbHksIGFuZCB0aGVuIHJl bW92ZQp0aGUgcm1hcCBlbnRyeSBmb3IgdGhlIHBhZ2UsIHdoaWNoIG1lYW5zIHRoYXQKCiAoYSkg YW5vdGhlciBDUFUgY291bGQgY29tZSBpbiBhbmQgY2xlYW4gaXQsIG5ldmVyIHNlZWluZyBvdXIg bWFwcGluZyBvZgogICAgIHRoZSBwYWdlCg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