Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp611705rwl; Wed, 5 Apr 2023 05:32:40 -0700 (PDT) X-Google-Smtp-Source: AKy350aItmOtL5+bLZyKA8d8F14ybYK/0GQTmnGzfnybVPFMrokKb2L7qd28F5yumGVHo1sq9XD3 X-Received: by 2002:a17:903:181:b0:19d:1d32:fc7 with SMTP id z1-20020a170903018100b0019d1d320fc7mr6971955plg.51.1680697960360; Wed, 05 Apr 2023 05:32:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680697960; cv=none; d=google.com; s=arc-20160816; b=GZUKgojiN9WQyjyx5DbYVo13KeHftekjgcADxSi/b/t6D8yTZCOFh+8jtjC/B26aGQ Y8zt7msz3fjenY9mw7W/tNy3f2XfCBvndQAkWjasQWCaCjYCo10+XWrm1+xtpxXKlBO/ MK3w9Fy4GrPB6MYwI3dErFPHkR2YXeGoYXCe2V3lBdYNiMo4Qm8q2tmsbVe/5Fhc0xeD dIt3sEXfZBGOf2Bs1Qpvpkg5xAQE0POA9KKNHiYVjuUFFDCO27xDOIkRjtPRPpfUjPEQ WvK1uoJ586UMhK0Zg5LirUmc+dkrMmd1aCHVewd5upEAKL+r76KTMISMJmVW9oNAc4Ra dOOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/cdLGLSnXQvccgnFgG1xJBIrPcVur36OcBlAnxR18Wc=; b=wW6PUvQ29LjM0jRIRggBB8q4+1jifXTuFnJ//COTu/rQzkBZ4IEloceACsTEcZwUmF e9It2TQ4x3fL113lwE+YG/Dn73QAH1Qs22cHfPQX4vnY13hcORWUds/ngdsJqjvurlLk dIEJtnqp+5xPNbJrnnS8IjH+PMaCgTmUpzI0Aawa77g+9xBzSfYtWJzhmca+nY9/fXB4 Bu7B1WnP49mS8oDrpKIxmSgClR3NcPwOB35kSJcN1Dn07TbtuSmmXfPWAXkWSDTRXPHb HwEpAM3T2GQ5KU0O0jkqExKoEaLf3RyHL0qcDpqK9rdSOWXhvQnugbP5KJHhFtNeWNE5 of9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AG+EZgJ3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ju12-20020a170903428c00b001a243522551si11748714plb.432.2023.04.05.05.32.27; Wed, 05 Apr 2023 05:32:40 -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=@kernel.org header.s=k20201202 header.b=AG+EZgJ3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237966AbjDEMbk (ORCPT + 99 others); Wed, 5 Apr 2023 08:31:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237788AbjDEMbg (ORCPT ); Wed, 5 Apr 2023 08:31:36 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 037EB1BE9; Wed, 5 Apr 2023 05:31:35 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8A0DD627D5; Wed, 5 Apr 2023 12:31:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2CD75C433EF; Wed, 5 Apr 2023 12:31:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680697893; bh=KFVTrjAz+H5bySuyR2Bq1Khen5yOd1Qtme1Bb1mppYI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AG+EZgJ3qAQfgY0+ZZZgyJXsxmcSCxUGOlyF3yG6GA/pNNdu3cJbKH2/4xeHtapHU 8KITD4pBhsc5TvHW50iExblXmcjY2LFFYtY2vLuaXrD78Xnny8GPdwCBy3/l3GEDA2 0PcemdB5uk8CF+tIK2n9GOoxJ4g0SiK4BeLKqvDqZngUI+LayhU+0ydmUGOrgi4PTg g7V2GuESOAJHvh1fLlqU24sPxnckxmjiUEpUAkqPBtJKKYTc+VIwvkkgr4DiAlOo/x wtvmjO3VUP13kxL3k0XI7AZyB4y5ZlMS6zceunb6lXJLe9kn6iYpT27bIMlvkR+NyU VDRnFwdwjQlcA== Date: Wed, 5 Apr 2023 14:31:30 +0200 From: Frederic Weisbecker To: Peter Zijlstra Cc: Yair Podemsky , linux@armlinux.org.uk, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, hca@linux.ibm.com, gor@linux.ibm.com, agordeev@linux.ibm.com, borntraeger@linux.ibm.com, svens@linux.ibm.com, davem@davemloft.net, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, will@kernel.org, aneesh.kumar@linux.ibm.com, akpm@linux-foundation.org, arnd@arndb.de, keescook@chromium.org, paulmck@kernel.org, jpoimboe@kernel.org, samitolvanen@google.com, ardb@kernel.org, juerg.haefliger@canonical.com, rmk+kernel@armlinux.org.uk, geert+renesas@glider.be, tony@atomide.com, linus.walleij@linaro.org, sebastian.reichel@collabora.com, nick.hawkins@hpe.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, mtosatti@redhat.com, vschneid@redhat.com, dhildenb@redhat.com, alougovs@redhat.com Subject: Re: [PATCH 3/3] mm/mmu_gather: send tlb_remove_table_smp_sync IPI only to CPUs in kernel mode Message-ID: References: <20230404134224.137038-1-ypodemsk@redhat.com> <20230404134224.137038-4-ypodemsk@redhat.com> <20230405114148.GA351571@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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 Wed, Apr 05, 2023 at 02:05:13PM +0200, Frederic Weisbecker wrote: > On Wed, Apr 05, 2023 at 01:41:48PM +0200, Peter Zijlstra wrote: > 1) It has the advantage to check context tracking _after_ the llist_add(), so > it really can't be misused ordering-wise. > > 2) The IPI callback is always enqueued and then executed upon return > from userland. The ordering makes sure it will either IPI or execute > upon return to userspace. *from userspace