Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp967571rwb; Wed, 16 Nov 2022 10:02:01 -0800 (PST) X-Google-Smtp-Source: AA0mqf6swxeuqpTU1t+PSAhpYQbaAp8IrS/YYqB92mR2guOufiV43PZow44zzjPNU37zCLDp076A X-Received: by 2002:a05:6402:2994:b0:460:858e:a8e1 with SMTP id eq20-20020a056402299400b00460858ea8e1mr20029356edb.401.1668621721739; Wed, 16 Nov 2022 10:02:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668621721; cv=none; d=google.com; s=arc-20160816; b=Z9PDCyQQ3F+o41kcENE5PXV6g51cUV2fm/bhNgc7GZpkxhgYTk7v3EHbC8rwH3m+Qe gIfH+J3INskP/On3k8u3T8nByo+A5VJMXmtsEvyrqYOT2VO+vXAR8bNO3Xj2viaYJdgu FgLXR+5B2ZfnUCJIDCQvf9hs37otVYwwgbhpGpNcOLnc10XuwtnPFfwkZeNLQjMWGBsm 568/AK7pGnTZQnsGZm6P+tS6jIYge7ZY0R/MpUXWJ4PtOUmk4z4bS9h9dwZXuf+81EUQ F6OFAciOgA2aIsWW8ynawzSnyVOd9j/B6wtka4zuB4qznFidbLbrTQioUaw+GWclAQoQ ljWg== 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=5GiK3SgiI9CKL6CbV/SHRk4GJHwDooVfogzt8LPWN3o=; b=b1tGMKmPEueT3bNx0DzRFtvnP9vYCecqdKZfz4gb8/ypUc3l/34UX9q26ulYqBscIS aMzyqEREwjmamLebs7CUIb5e3k5J0RRLDL4UbJzAP3UmKCt+v+TsPaThpdE2IPakBvf7 hBnh8YPBODzCplcRY5L44A1Ibv1g5Axq27Ujwgibt7LMJ6t8fEPsGIJKV3WsrBnCYEDb YTx76A8dm3wfgUl2jfwX3GwY5ZPmd3CoRhKAclZlStMpyRIt9PemBVSxkw15Q+mrq6ov A+o+PUrNiBhUwp55R7sLulS3rH+Gr44nVKCfsd1p39XVg4EQXv5b37XWa5YCTaiRwGI5 W+RA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=TqeYel93; 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 co8-20020a0564020c0800b0045d0c00ead2si12924115edb.157.2022.11.16.10.01.31; Wed, 16 Nov 2022 10:02:01 -0800 (PST) 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=TqeYel93; 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 S234047AbiKPRpc (ORCPT + 90 others); Wed, 16 Nov 2022 12:45:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233464AbiKPRpZ (ORCPT ); Wed, 16 Nov 2022 12:45:25 -0500 Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82B0E5E9D7 for ; Wed, 16 Nov 2022 09:45:24 -0800 (PST) Received: by mail-qk1-x72e.google.com with SMTP id i9so12129428qki.10 for ; Wed, 16 Nov 2022 09:45:24 -0800 (PST) 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=5GiK3SgiI9CKL6CbV/SHRk4GJHwDooVfogzt8LPWN3o=; b=TqeYel93n9lNXLImI0rYMMKitTxHGoo/8D+RKHflcgvzNACmHDu6Eb9di/e7V/YbE8 JSJRp318JWElgMvnZtF2Sfh/DzdgvepAY2rDh1s1dTzV9kR37AskjrOctkn0OTHyoRkt uA55JflOEh28Mq/hdA83+W+8Zqe5ZMbDkRHAw= 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=5GiK3SgiI9CKL6CbV/SHRk4GJHwDooVfogzt8LPWN3o=; b=tHJBzniv6zcRRutwrXabHyiRdKv6+tr7v4/c7BfblZ7QTqzezBeTWrgan2zaS8G4H2 H5dE5d3eH3Q9QgyzWB7DFDO9ocy5DemBbrzZb3zqOKBBhv7BW4zxC1r1ERkEFzHtNA0u AEA6N9wDHIdVFLNMDT+Ov3/qdvtv50cfhY4XcRYkRO63dLsV6xwWr8lgLQgEfG+5IpJd waRAoBgT12HHfruAYe+9dNZqSnjoBBthtmqJuzHYTops+7Dgse3Pti+ZtaaxvWrlKuS8 nYYP/W0i0cM6O7Y+B+dSw7K7bIHSPD1/e5+KbzcHrwnqPsxRAFu26GVTUcwZ/GkFpa5F mxFg== X-Gm-Message-State: ANoB5pn3ctxyj6Bn5Ichyb0MI/GfD9c+IfzCV9Wc46qnnu2lP+YgQuJ7 vLKXb9kSR+PsdMZHNJwqiR9IBC17/iXB5A== X-Received: by 2002:a05:620a:1a23:b0:6fa:b73:812e with SMTP id bk35-20020a05620a1a2300b006fa0b73812emr20412314qkb.433.1668620723400; Wed, 16 Nov 2022 09:45:23 -0800 (PST) Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com. [209.85.160.174]) by smtp.gmail.com with ESMTPSA id c22-20020ac87dd6000000b003a55fe9f352sm9164461qte.64.2022.11.16.09.45.20 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 16 Nov 2022 09:45:21 -0800 (PST) Received: by mail-qt1-f174.google.com with SMTP id w9so1327207qtv.13 for ; Wed, 16 Nov 2022 09:45:20 -0800 (PST) X-Received: by 2002:a05:622a:22a7:b0:3a5:1ba7:717d with SMTP id ay39-20020a05622a22a700b003a51ba7717dmr21964368qtb.678.1668620720230; Wed, 16 Nov 2022 09:45:20 -0800 (PST) MIME-Version: 1.0 References: <20221109203051.1835763-1-torvalds@linux-foundation.org> <20221109203051.1835763-4-torvalds@linux-foundation.org> In-Reply-To: From: Linus Torvalds Date: Wed, 16 Nov 2022 09:45:04 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: mm: mmu_gather: do not expose delayed_rmap flag To: Alexander Gordeev Cc: Hugh Dickins , Johannes Weiner , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Nadav Amit , Will Deacon , Aneesh Kumar , Nick Piggin , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Sven Schnelle , Peter Zijlstra , Gerald Schaefer 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 Tue, Nov 15, 2022 at 11:49 PM Alexander Gordeev wrote: > > Flag delayed_rmap of 'struct mmu_gather' is rather > a private member, but it is still accessed directly. > Instead, let the TLB gather code access the flag. Now, I set it up so that if you don't use delayed_rmap, the tlb_flush_rmaps() function ends up being an empty inline function, and as such the compiler should already have done this for you - including optimizing out the test that then doesn't even matter. But this patch shouldn't *matter*, but it also isn't wrong, so.. Acked-by: Linus Torvalds Thanks, Linus