Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2130517rwl; Thu, 6 Apr 2023 06:20:02 -0700 (PDT) X-Google-Smtp-Source: AKy350ZFO0Tk3uePW4U45vnz3xeAg7Lp76a0IWGU9dZx4LCaJkfo4X181g3ocrLtJuh5ESSPMMIs X-Received: by 2002:a17:907:388:b0:93a:6c59:4247 with SMTP id ss8-20020a170907038800b0093a6c594247mr5987121ejb.13.1680787202284; Thu, 06 Apr 2023 06:20:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680787202; cv=none; d=google.com; s=arc-20160816; b=DZ1Q8mM/1qPONRLMhmWM7v11f7Kd4f0mbwS3RUAd/gXY891ZSRU+cphFin6fhFw+9n HOs6eKk1VUs97vseXcN57pYQvXeUuOOiZwyB+SfkwGxpSSKhtEfet8UhWLjEUCQ4A72a w0ofejCfBNKcSXwKffE6AX+vrNW3QsN/R1LCUSLhW7fYozoiEUnreB/G2UtqQWlRkgXp Igv3zVsApKNcmzI1wHDy/o+h6LHJd4wcPKxZhRrEZVHFnUTpX2ATY0cva9PCEisvAGnc 7FM0WwvdnnzAOMrgZZ0XD/5I25ba7ESVSKGp8YF+uXKf28BJkZ5GrA6htege6GotF4oJ znCA== 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=rEZb6SaUsngmnCMPg4YGowc9TbgaZEBXr+mRqfM4dbw=; b=dkm5ymcfqWBRT387X5ao9cWN4G2f1N38acOi1vY9w6E8Bc/3BVbIorJOgwSwBo1iHN DMbuWeoyenoUz0j8QDIGE/D6juIC2qQBK+5b62c5ZlI10StHVZL7T2RiGGH+NCoPuTK7 sfp/lr+n48rpVxgkJMYP1SQR6VBZe7a0s0ziveGRCLtPfmdozCtF2KJmufan1RyupAqp PcOIcnLF7Bxi/TXcom2trivCT1ijnFC5O8CwAqoKdnBT7rGp7/vR3fjsDNxRVi79v65L UZID994DqPwgXm35rFOKh4oyuqheKVisg2MiDJaO0DgF+6M3nuUyaKfh3RL9RyTgM9nt yWow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MHUVdOi4; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o25-20020a170906289900b0093defbd6274si1094045ejd.1019.2023.04.06.06.19.32; Thu, 06 Apr 2023 06:20:02 -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=@redhat.com header.s=mimecast20190719 header.b=MHUVdOi4; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237912AbjDFNSb (ORCPT + 99 others); Thu, 6 Apr 2023 09:18:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237861AbjDFNS0 (ORCPT ); Thu, 6 Apr 2023 09:18:26 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F4A47EE7 for ; Thu, 6 Apr 2023 06:17:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680787021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=rEZb6SaUsngmnCMPg4YGowc9TbgaZEBXr+mRqfM4dbw=; b=MHUVdOi4tqCXzmCjgS0njmlIT/G0c8b0oxOXWvFtyLugfa25BIP10eNqHmEtT5IRHfNCfh b8Dhgg0IjdMzuoan8pISWokeoX3M3v54NbnNG21pZeMNQ79eT7tCr8ylPs9Bh68w6uzZd/ MouawzxfU9ZGQs+5lcQO4ONmcU+W510= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-643-10l_5oWZPX2YbGgfWqkGXw-1; Thu, 06 Apr 2023 09:16:57 -0400 X-MC-Unique: 10l_5oWZPX2YbGgfWqkGXw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2B0A9884EC0; Thu, 6 Apr 2023 13:16:55 +0000 (UTC) Received: from tpad.localdomain (ovpn-112-2.gru2.redhat.com [10.97.112.2]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 82F2D2166B26; Thu, 6 Apr 2023 13:16:54 +0000 (UTC) Received: by tpad.localdomain (Postfix, from userid 1000) id A64FC40EB07D7; Thu, 6 Apr 2023 09:49:22 -0300 (-03) Date: Thu, 6 Apr 2023 09:49:22 -0300 From: Marcelo Tosatti To: Peter Zijlstra Cc: Frederic Weisbecker , 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, 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> <20230405195457.GC365912@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230405195457.GC365912@hirez.programming.kicks-ass.net> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 09:54:57PM +0200, Peter Zijlstra wrote: > On Wed, Apr 05, 2023 at 04:43:14PM -0300, Marcelo Tosatti wrote: > > > Two points: > > > > 1) For a virtualized system, the overhead is not only of executing the > > IPI but: > > > > VM-exit > > run VM-exit code in host > > handle IPI > > run VM-entry code in host > > VM-entry > > I thought we could do IPIs without VMexit these days? Yes, IPIs to vCPU (guest context). In this case we can consider an IPI to the host pCPU (which requires VM-exit from guest context). > Also virt... /me walks away. > > > 2) Depends on the application and the definition of "occasional". > > > > For certain types of applications (for example PLC software or > > RAN processing), upon occurrence of an event, it is necessary to > > complete a certain task in a maximum amount of time (deadline). > > If the application is properly NOHZ_FULL and never does a kernel entry, > it will never get that IPI. If it is a pile of shit and does kernel > entries while it pretends to be NOHZ_FULL it gets to keep the pieces and > no amount of crying will get me to care. I suppose its common practice to use certain system calls in latency sensitive applications, for example nanosleep. Some examples: 1) cyclictest (nanosleep) 2) PLC programs (nanosleep) A system call does not necessarily have to take locks, does it ? Or even if application does system calls, but runs under a VM, then you are requiring it to never VM-exit. This reduces the flexibility of developing such applications.