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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE6B7C77B70 for ; Thu, 6 Apr 2023 13:32:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5D1386B0071; Thu, 6 Apr 2023 09:32:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 581646B0074; Thu, 6 Apr 2023 09:32:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4720F6B0075; Thu, 6 Apr 2023 09:32:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 39D4D6B0071 for ; Thu, 6 Apr 2023 09:32:59 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id DCCAF14133A for ; Thu, 6 Apr 2023 13:32:58 +0000 (UTC) X-FDA: 80651056836.03.8F5C914 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) by imf07.hostedemail.com (Postfix) with ESMTP id 8E54D40022 for ; Thu, 6 Apr 2023 13:32:56 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=infradead.org header.s=desiato.20200630 header.b=BDn6m0yW; spf=none (imf07.hostedemail.com: domain of peterz@infradead.org has no SPF policy when checking 90.155.92.199) smtp.mailfrom=peterz@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1680787977; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=8m50I/Ah33OEfXawnqY/+7a+kb6PdH9s8PZL/puCTb8=; b=p8n8BFrX6FqZpf1ZtCc3osnxkk8D3ZcFqQVkeqMTCJE5mb8ySvHbY6z+dQqHMEy1uW+r5I RHvVsgcVWBUGXlR4c9fc0p9iPSeDvgiNBysVS3elfTrxIeq2BF39KLanANKiNgnfKMvpgO aJpID5R69xgRJr8qmDDvWjdD9Beugzc= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=infradead.org header.s=desiato.20200630 header.b=BDn6m0yW; spf=none (imf07.hostedemail.com: domain of peterz@infradead.org has no SPF policy when checking 90.155.92.199) smtp.mailfrom=peterz@infradead.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1680787977; a=rsa-sha256; cv=none; b=XLKwF/VqGKMNa9YzAY0cXTgMLpkqZgN2Rr/Zfgj+/siZoI7diD3HQc+k8snGAhgl3on6O3 Kku3//XVceEJQYa3UtLubckI4MFETCqzHRTRFh8vxLLSa21KscpQm0bsZC2gEM5le+1IRR hzFZuteHAoo6fJKYI/r1atgf/66TG1w= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=8m50I/Ah33OEfXawnqY/+7a+kb6PdH9s8PZL/puCTb8=; b=BDn6m0yWTioOdmUoj2vNFk/9Kq E3jqJ2aswcVVxCzKrLJcxUza7IGtwWNvHaCywMfJf4ZqTjvIJqrQnKwgLnyKqVaB8mB0HJrFfgWJ5 QoWrxGQt8uXMJZ1oWyaF6RQG2UmojK9F4eXmB1OkhAO+YwUs7gNgvlxNnenV+vzWvaD9yCcGzNyhH qY9Fq8ToVeVAGpc7TALor/XzTwT+IgjMjtlibDz2/Kw4q0z21hdW+F2EDFbmp5RoMAX9GLXNwIa9b e5q7Ym/WFOQGFTf28c+5rkhAfU4qynJ0DYOiow3+Q0jkH8SYzkWKnhoWVPQCxLWuVTNBYyo1iOZF7 OufwRulQ==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1pkPih-00AXEX-1N; Thu, 06 Apr 2023 13:32:07 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id DA9393000DC; Thu, 6 Apr 2023 15:32:06 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id C1731212E36AE; Thu, 6 Apr 2023 15:32:06 +0200 (CEST) Date: Thu, 6 Apr 2023 15:32:06 +0200 From: Peter Zijlstra To: Marcelo Tosatti 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: <20230406133206.GN386572@hirez.programming.kicks-ass.net> 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: X-Rspamd-Queue-Id: 8E54D40022 X-Stat-Signature: 4cux17subsygcgsuf95rt7amk54o6u3g X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1680787976-300282 X-HE-Meta: U2FsdGVkX1+J/wyk6xPV8OnGFF6WNpwbp/48G129AIAaQvDnXiToqMUXtadAolqbvcVe1DgB7dbvJd+mab25sx4C1cDZG1Dlhn4HqcT1j48Ch2tuIPqFPxDyFQhpszouAFdMtGSz1mSECF/ynHiHOj/1s/15UopSRwrTTDTT/iakIKzcLq6Oofqc6KkzPxX+oBx4jxCTg5TdG8ySKvZNVoqQxK7+QlRDtmDVP42scG8v+hYeVtEFQDPTCzSJLtZkzDBy+K7B83uLF26qNzakXGQMWt/JFcj4I2iN8X2M04xj4yGyMsfWBhs5R/CKGMsib88VlNrrPGlGuB05AwIyrxI4lGRloRvIHvuIoqaBCzMSRIJU1rJYZ1uf4/SvXuPYkDLeRWWiB9iqNSBYMaNAg9056UphsdjZ8FZwZgySLve6NwUlEmAWZBji3quqzE4usi7AMWsfVa+hGht0d088NAjEXaBbX3iJL9MTCjeSo3/z8xxKWnMwK3QiH7Lk8DEbpvcXIv4YNi0AHE2JFeZ6YS7nCiDbYPlzFd7Y0tfRgHs6lL23C/vK23fyHdYfKqeX4ESS1NnNfXSRFCMCSOVhiiIPnpEOlduuiZ+IFVwx70yHYt17LcqPKuDdkv/37khlZ+dJvuUaK78/O/JfDyJxnJyhFmEZ1PaK+ZNTsus9qLqami4yhTLH1bStFf/YzXWuWKszSXsu1ZKxO4FL+RpN8hWcZiElaHTvWEezlQMf7dECx/m94hTwQhhYYEzkLA1rf8+lfbcwi9454ex4mmaU+56UbzVQ8rfnLM9vZqBVPR98/OeTDP+YELRmJ+QGgo5046VAkUpDCHTWkP3sHvdP8vmGsTSjx761HvpWK1fgzkpUF/qkzaPt+5wLDr8IzI9x5CaQHxMNXomyFe3JIZoVws4gXE2rQUPNhSoQS8NJk+HYNF59gwMdLcMo6xRSnutOiwI3/jW3mpnkm/7A+ih RjDVf5Hu m0sWY4F/E5HZhJjXQxriZFco1MkxEFPSbnqe0MEKNMlfgAwgp1GKZcqiOE+7pF6upmrpGqWNMUYbloy7518nSk2VWRojdCdpmL6/g5rewuqa1Zu/L6St8HevJPsE70gRO657r4xsjW6VxGD/S5X7dadXEnb8zA8brYnenwuB58PMaF0wDkrfYpxh4DpFA4r00nwCRExbCKvStZKBxiFRUgqh3wpZsTQjhVGE0HuqgAPVC0NanjzcUD84GxvdsjLLaHDnuIvapcxWTbS+YFs9Hyj5hKBMdFraLwdoM X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Apr 06, 2023 at 09:49:22AM -0300, Marcelo Tosatti wrote: > > > 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) cyclictest is not a NOHZ_FULL application, if you tihnk it is, you're deluded. > 2) PLC programs (nanosleep) What's a PLC? Programmable Logic Circuit? > A system call does not necessarily have to take locks, does it ? This all is unrelated to locks > Or even if application does system calls, but runs under a VM, > then you are requiring it to never VM-exit. That seems to be a goal for performance anyway. > This reduces the flexibility of developing such applications. Yeah, that's the cards you're dealt, deal with it.