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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1ECC8C433FE for ; Tue, 8 Nov 2022 21:05:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229846AbiKHVFq (ORCPT ); Tue, 8 Nov 2022 16:05:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbiKHVFo (ORCPT ); Tue, 8 Nov 2022 16:05:44 -0500 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1402961B82 for ; Tue, 8 Nov 2022 13:05:43 -0800 (PST) Received: by mail-pj1-x102e.google.com with SMTP id l22-20020a17090a3f1600b00212fbbcfb78so18977840pjc.3 for ; Tue, 08 Nov 2022 13:05:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=PKI87OExUpz/SA+Wz6oxCLS24A1uuiiZj1NsUHkplvE=; b=mcJaYuu25CE1SjcCXkIg35/3w9UmXjO0hm9kX7JtHp9uK0ODioTlnLz5qx3SF4Aks8 PeYrdYzOGuyw3rI8utzb0QaEGGj8ffbYlUzbtS9fS/CrQUcKIM8zSu2eP1+dpokUybUI wed1AqUv+QZwR2dvwwlUTGsjRwulDa6nE8VekduI1Oz23cnIOdG+t2DkQN2WFUQ/Y6VE /e2Qt1fbazYqtfZCjFaSBApqHKrDU6wheQwHaoCMZ8h6jy9ISVj5MZzbG364+wFtLN+K 3uC1vbN/OO5LluYgA8x5SFbaMaoKXO5iVc+ePXSNCPRphK1N9/2dsY7QEmFl8cJQHPUD QFVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PKI87OExUpz/SA+Wz6oxCLS24A1uuiiZj1NsUHkplvE=; b=loEmgEQpSzjlY6XrtmoHm4Qg7xMNDyRbCZ9Ac/pw3YlaOUSR+d2K31XQjhcjlbodki YTtxNEsoism/TVGCq363JiLUkDG+/e0a4Bf6yhKwju+KkH++i6keyjwWCri8hzONBLvH DHfVtdEQL7ZFqKGxwQIQIYVCATSmeLlkePwRkkOSaJzgFqRVeHOEsgDEF6T/QwSdUq4Q bLKTFopS4EIHBrtfwy/xLpWwU1mQ6zFvFcW2LN8HdOZHGI/EOKJjJ6BT8OdhZLa0Jh5h QAe6V18ccPHbcn4sTF6hpY9xIRhmSO+u98CTzPpTdAv+6lS811FuaUDyMRfaDznxKZvw 77qg== X-Gm-Message-State: ACrzQf0ES1L4dSAfWBxWhnDdcBCjlNFOb0/E/2ZSfc7YEpXSC94vbEsv 4JlQq78DRPk/Gw/7B2mkzoU= X-Google-Smtp-Source: AMsMyM7jZVkfz1Tj3OC34o3Rx8LB+9qVSkpR8rngeFKy85GRtXtb1/9g2VOTioYNnJhhtv4T3uKdkg== X-Received: by 2002:a17:902:b602:b0:188:620d:351c with SMTP id b2-20020a170902b60200b00188620d351cmr27459552pls.111.1667941542355; Tue, 08 Nov 2022 13:05:42 -0800 (PST) Received: from smtpclient.apple ([66.170.99.95]) by smtp.gmail.com with ESMTPSA id u14-20020a170902e5ce00b00186c5e8a8d7sm7402730plf.171.2022.11.08.13.05.40 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Nov 2022 13:05:41 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: [PATCH 4/4] mm: delay page_remove_rmap() until after the TLB has been flushed From: Nadav Amit In-Reply-To: <20221108194139.57604-4-torvalds@linux-foundation.org> Date: Tue, 8 Nov 2022 13:05:39 -0800 Cc: Hugh Dickins , Johannes Weiner , Andrew Morton , kernel list , Linux-MM , Will Deacon , Aneesh Kumar , Nick Piggin , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Peter Zijlstra , Gerald Schaefer , David Hildenbrand Content-Transfer-Encoding: quoted-printable Message-Id: <519E803D-4D58-4252-B596-A40D7C156BC1@gmail.com> References: <20221108194139.57604-4-torvalds@linux-foundation.org> To: Linus Torvalds X-Mailer: Apple Mail (2.3696.120.41.1.1) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Nov 8, 2022, at 11:41 AM, Linus Torvalds = wrote: > When we remove a page table entry, we are very careful to only free = the > page after we have flushed the TLB, because other CPUs could still be > using the page through stale TLB entries until after the flush. The patches (all 4) look fine to me. I mean there are minor issues here and there, like s390=E2=80=99s = tlb_flush_rmaps() that can have VM_WARN_ON(1);the generic tlb_flush_rmaps() that is = missing an empty line after the =E2=80=98page' variable definition; or perhaps = using __bitwise for sparse (as David pointed) =E2=80=94 but it can all be addressed = later.