Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp1073244rwi; Mon, 31 Oct 2022 10:51:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4C7dHcjaqQ8NJ563c9KtBurAA9XCr8o6OAodTYBDsszCcfoCyiksiLNeavC0dIS2IaH4Um X-Received: by 2002:a05:6402:1e88:b0:461:a513:f543 with SMTP id f8-20020a0564021e8800b00461a513f543mr15161720edf.183.1667238664881; Mon, 31 Oct 2022 10:51:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667238664; cv=none; d=google.com; s=arc-20160816; b=euW2XKCAtyRMtqJIhm1Rg+jf0IGcbQHCi/CFGz04l7IcqXUv3Bxgahj0PTwkcwMDWU hzpn72yAifn7GiTzcVp/44bK+CNQ6Axt2YtXxoTg+YK7PPn0dy3XD5zysOmH28aB+Afj Wl3dPyj5+psQ6Dkp365myZSQYfcJz9xTfhGbq8zs3PNeKWFCRRq3km5l+n0A8wx9ajhQ 2/+hzmRBJvggGf1dzzBxSeO1w74aHKzjKY2Vbxat2iCBybnxs78S0h0B4DAY+TqkqDrh znTzwfLiXeNjgmrlR1PUldo40PQiI8bnFPiNSCbi9sy89MpXGcc6ltt1F2hi5scKj1+L WwrQ== 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=GiwfLGsYKGKqvxfaUpvxh0ddsH6A8EMDdI1AAfBFwR8=; b=q3IOPasesr7iRdYwT5GvFkZuAKineWTWLTfJHiRzedhIdcbMIacpt/58q+GoQajvvx +7+xJ+7Evp/OXh939BdNQR2zDfR/OEsEzvr8U8pTeDdUlmqPWAuU1j1khBhFpGvRUU8m mDb/UOiC64i414bhPrd/EMwQ5NvAM14CjPSQMKMM6WJRLnstvGcNErINVEzjn++e1QYc K230Ardq1iYcoVQv2GKBQeXzS1QZQeejCowBR6vvHBMnMXt6o0QkFePoGvcjd8HpAYFV PToQEDXjMMBo0YYOAhBRm3d0iFOba9DGLuaABPs8rS1T6aXWtp6C5KQuZnL3ovp48PZx tMLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=RJNXAl4s; 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 g16-20020a1709065d1000b007adadfc97c7si7462606ejt.918.2022.10.31.10.50.39; Mon, 31 Oct 2022 10:51:04 -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=RJNXAl4s; 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 S231423AbiJaR2h (ORCPT + 99 others); Mon, 31 Oct 2022 13:28:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231316AbiJaR2d (ORCPT ); Mon, 31 Oct 2022 13:28:33 -0400 Received: from mail-qv1-xf2e.google.com (mail-qv1-xf2e.google.com [IPv6:2607:f8b0:4864:20::f2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE486DFA7 for ; Mon, 31 Oct 2022 10:28:31 -0700 (PDT) Received: by mail-qv1-xf2e.google.com with SMTP id n18so8752847qvt.11 for ; Mon, 31 Oct 2022 10:28:31 -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=GiwfLGsYKGKqvxfaUpvxh0ddsH6A8EMDdI1AAfBFwR8=; b=RJNXAl4sM9GOrR3xZaI/kd+gZP5+ucsr4fxQ1xRHNzAZOEbQdWzufnFOZiVAuQVEvy AIf797KosLKauy7PMx7QOiM6NTVoi/1tH3GEgdYxHPu0xDEF215vvchzlmNUv5XdIXen b3pm08YtfvWylBjAPcC15K5d4vJdlZCZJygIQ= 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=GiwfLGsYKGKqvxfaUpvxh0ddsH6A8EMDdI1AAfBFwR8=; b=ukFFo7DcYRVchM1gKeMz+m0XtfusZjFxxK0SH9NCUrApG1GOBNGAFVnNQX4RUgOWni bP7DsICMTz9U7TvuMzNKqg3VfxtT2Fvrij+nXWuYX2uZg6zzgNSlrY72b/TlQAfLKzcs St57XPr79awUZ4i3ZTe95wuYWAGr7d2DobpH23TdAaqPP+G2KlZNReCQdpMYxKNoT0ZH SXbhrukmKnA1hCNeW5z1WzxOi0k3HbHiXg+l3swchmCGKnL3Agsa7MeebwlnROERVAaV TujW0RIdfCJidWBTm7USSN12yS3/xUWXJ12gHXFf9OnbVMiYF7alWFqPzyRCyjN+Nfgz p3Hg== X-Gm-Message-State: ACrzQf1j8v7nVRNbKSJrboQD2FNfpJlVn3d29X3+T/E6zV25WV6zFdqf DPEEt9SnDoDIJTm2qZeohtBxF9xu/BviUQ== X-Received: by 2002:a05:6214:226b:b0:4bb:6500:8f44 with SMTP id gs11-20020a056214226b00b004bb65008f44mr11987042qvb.109.1667237310855; Mon, 31 Oct 2022 10:28:30 -0700 (PDT) Received: from mail-yb1-f178.google.com (mail-yb1-f178.google.com. [209.85.219.178]) by smtp.gmail.com with ESMTPSA id j4-20020ac84c84000000b0039cc665d60fsm3913128qtv.64.2022.10.31.10.28.28 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 31 Oct 2022 10:28:29 -0700 (PDT) Received: by mail-yb1-f178.google.com with SMTP id o70so14494523yba.7 for ; Mon, 31 Oct 2022 10:28:28 -0700 (PDT) X-Received: by 2002:a05:6902:1352:b0:6bb:3f4b:9666 with SMTP id g18-20020a056902135200b006bb3f4b9666mr12896451ybu.101.1667237307861; Mon, 31 Oct 2022 10:28:27 -0700 (PDT) MIME-Version: 1.0 References: <47678198-C502-47E1-B7C8-8A12352CDA95@gmail.com> <140B437E-B994-45B7-8DAC-E9B66885BEEF@gmail.com> In-Reply-To: From: Linus Torvalds Date: Mon, 31 Oct 2022 10:28:11 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 01/13] mm: Update ptep_get_lockless()s comment To: Peter Zijlstra Cc: Nadav Amit , 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" 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 On Mon, Oct 31, 2022 at 2:36 AM Peter Zijlstra wrote: > > > (c) move it to clean_and_free_pages_and_swap_cache() that actually > > does the page_zap_pte_rmap() now. > > I'm leaning towards (c); simply because the error case is so terrifying > I feel we should check for it (and I do have vague memories of us > actually hitting something like this in the very distant past). Ok. At that point we no longer have the pte or the virtual address, so it's not goign to be exactly the same debug output. But I think it ends up being fairly natural to do VM_WARN_ON_ONCE_PAGE(page_mapcount(page) < 0, page); instead, and I've fixed that last patch up to do that. Linus