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 02143C4332F for ; Wed, 16 Nov 2022 17:45:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229794AbiKPRpc (ORCPT ); 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-Google-Smtp-Source: AA0mqf6XApqiKYnkkH33cVGkaDXrcd5p3941RLtOKVqHNunaDKa1C23JcNZE4fBLGoAKYFgSQnd4Nw== 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" 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