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 4ABA6C38A02 for ; Sat, 29 Oct 2022 19:20:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9B2FE8E0001; Sat, 29 Oct 2022 15:20:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 93BC66B0073; Sat, 29 Oct 2022 15:20:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7DC538E0001; Sat, 29 Oct 2022 15:20:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 6BE846B0071 for ; Sat, 29 Oct 2022 15:20:49 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 311231C5CF8 for ; Sat, 29 Oct 2022 19:20:49 +0000 (UTC) X-FDA: 80074954218.17.6784C47 Received: from mail-vs1-f49.google.com (mail-vs1-f49.google.com [209.85.217.49]) by imf08.hostedemail.com (Postfix) with ESMTP id D43E216000E for ; Sat, 29 Oct 2022 19:20:48 +0000 (UTC) Received: by mail-vs1-f49.google.com with SMTP id k67so7960651vsk.2 for ; Sat, 29 Oct 2022 12:20:48 -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=/HkzTpfg36PYCftvN9qg0a3la1IW0pkLjuTadw/ixKU=; b=BUfN3lBM1gukxgoBW7mYYYBvgXWGeBE0TBDeU6SZ0TSh9y73moySkjR/DdOvspkDQL 0MFcKEQeA5u4IhDwS82sqYV8BpMiUTiDz/Rj/+iO4S+LvEKoye7SNXRig5jGxcLHNrds Q4mJJpKnfQd0JtRcyqS/xrwbiWrZxzyKeAfE4= 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=/HkzTpfg36PYCftvN9qg0a3la1IW0pkLjuTadw/ixKU=; b=Fr1gXncU/Y0yPwcgtCjlDbiyEyWSGh6lLv6u4L8gXyNUNaghYWTqHmIwsd7klUMBqa wVAG68pABpET3LGvisUnHvly7RPmv76USuFjSek29TS+JSWv0+RwRsH24A7IRzC9ICyR buZ/b1oIV3Za9BDQLdrHkgZSGoiSg6kf1Mevg4fyD6pew1uGvNOfaifFu966MoAJ6DxF AU19y1w/v0PN9VcKW5TVLpC0ClemvnHLxJ0nX6jnfKdTlhTyPOQsGCRyGslCTWV90kJc EDjNgXMpxlPlZVQdNmo0ugOiIoR79d/sfvaRUkclmV77Befx0D4hwI789RYUM7vlkXMg a7Og== X-Gm-Message-State: ACrzQf3oxuav0JHf0hR6C+tMk2kAlsaPbPlQwjCAOY4VK4sPWWo1BBqS pLRlluYsWEZUJ1iAIps3fBbqgKqk7X4ulg== X-Google-Smtp-Source: AMsMyM4cTRZkOThLexKS09dw0pHPqGi/4YyGKDc69+TgecBAGfD/u32rQb5qgghKkDD8XYwwp9dcCA== X-Received: by 2002:a67:b84b:0:b0:3ac:7d5d:981c with SMTP id o11-20020a67b84b000000b003ac7d5d981cmr607109vsh.79.1667071247841; Sat, 29 Oct 2022 12:20:47 -0700 (PDT) Received: from mail-ua1-f52.google.com (mail-ua1-f52.google.com. [209.85.222.52]) by smtp.gmail.com with ESMTPSA id e1-20020ab03141000000b004067c422628sm271013uam.3.2022.10.29.12.20.47 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 29 Oct 2022 12:20:47 -0700 (PDT) Received: by mail-ua1-f52.google.com with SMTP id e26so3352634uaa.7 for ; Sat, 29 Oct 2022 12:20:47 -0700 (PDT) X-Received: by 2002:a05:6902:702:b0:6ca:a588:2904 with SMTP id k2-20020a056902070200b006caa5882904mr4923591ybt.571.1667070877749; Sat, 29 Oct 2022 12:14:37 -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 12:14:21 -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: text/plain; charset="UTF-8" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1667071248; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=/HkzTpfg36PYCftvN9qg0a3la1IW0pkLjuTadw/ixKU=; b=kNhl4W4hlYSYrymHY8fdcjpSujv9tOy+LDWuo1TPfTTNGy/8ubJyGVR1L/xQK9xvGuaGSY QtJGWeV8D8QziLZOpaQSDP44C5bEwXBfjs9D1IfJXNmLvuObpggfmcGzofahxlJQWZvVdf IqE1Ws1f8uVoyeQJrMnGEwKTjL6pL2c= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=google header.b=BUfN3lBM; dmarc=none; spf=pass (imf08.hostedemail.com: domain of torvalds@linuxfoundation.org designates 209.85.217.49 as permitted sender) smtp.mailfrom=torvalds@linuxfoundation.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1667071248; a=rsa-sha256; cv=none; b=whcbr/HzydjnU07I+vs0q5AYSJbtFUatCGIDZBsqqSU8BwER3c+XTH5q41XU83k3wzvmfe rF7NtVaR/L6eqdheAIbRTwa4CYVDdGk73XNOe6He8bdCtiDZiOdIXVCrLlpDzH8VqwB9lW 9dj5va/stmZmtZQI5VnInAkGQ6TQfKE= X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: D43E216000E Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=google header.b=BUfN3lBM; dmarc=none; spf=pass (imf08.hostedemail.com: domain of torvalds@linuxfoundation.org designates 209.85.217.49 as permitted sender) smtp.mailfrom=torvalds@linuxfoundation.org X-Stat-Signature: 3z6q7o8bz9uhnojd4q9pjaxmks7aieda X-Rspam-User: X-HE-Tag: 1667071248-986532 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 Sat, Oct 29, 2022 at 11:58 AM Linus Torvalds wrote: > > 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 ;^) Well, it boots, and I see no difference with your PoC code. It didn't fail for me before, it doesn't fail for me with those patches. Again, the "it doesn't fail for me" is probably because I'm running it incorrectly, although for all I know there can also be hardware differences. I'm testing on an older AMD threadripper, and as I'm sure you are very aware, some AMD cores used to have special support for keeping the TLB coherent with the actual page table contents in order to then avoid TLB flushes entirely. Those things ended up being buggy and disabled, but my point is that hardware differences can obviously actively hide this issue by making the TLB contents track page table changes. So even if I were to run it the same way you do, I might not see the failure due to just running it on different hardware with different TLB and timing. Anyway, the patches don't seem to cause any *obvious* problems. That's not to say that they are correct, or that they fix anything, but it's certainly a fairly simple and straightforward patch, and it "feels right" to me. Sadly, reality doesn't always agree with my feelings. Damn. Linus