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 D9CE4C6FD18 for ; Wed, 19 Apr 2023 11:18:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 24DD98E0003; Wed, 19 Apr 2023 07:18:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 148B48E0001; Wed, 19 Apr 2023 07:18:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ECD3B8E0003; Wed, 19 Apr 2023 07:18:55 -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 DBF598E0001 for ; Wed, 19 Apr 2023 07:18:55 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 9FCADA01BA for ; Wed, 19 Apr 2023 11:18:55 +0000 (UTC) X-FDA: 80697893430.18.96D62BB Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf21.hostedemail.com (Postfix) with ESMTP id CD58B1C000D for ; Wed, 19 Apr 2023 11:18:53 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=T84gPzen; spf=pass (imf21.hostedemail.com: domain of mtosatti@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=mtosatti@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1681903133; 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=yk2MXIcMGsqVm4bpeyyiPIAlxJgEs4vB5F4slfGpqbs=; b=MVolNyqA3ABaWgSY01gPuRbpqGA/0RMEAsfmThljgkvJWSlHsXqNsCamBjUuO2BQDUqLqd 0K2nz98c7J7d9Xd8PYxfKLuNwYRzzr/+RHRscz+y6YYamv150wxcd/tOiH+D23viN9IOGP FtM5ntoaycnrLaHrUCz6j9IgHd7kEmI= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=T84gPzen; spf=pass (imf21.hostedemail.com: domain of mtosatti@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=mtosatti@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1681903133; a=rsa-sha256; cv=none; b=salnHeQe5K8Kp8FF9gbCPVU4HbR/IdmGx9lgNpIp1mvXvzoshInzZE/j7yK3gvcrX2RRCD RC8MSjNsNdTi5XU5XHa7IadcHAld1eJHbsp9VJtDfQ3r6OxTGwxsEzenOc8e/NylPvjxfm BAcf3H0iQ0a5IfswDK0soBiECsgWIZU= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681903133; 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=yk2MXIcMGsqVm4bpeyyiPIAlxJgEs4vB5F4slfGpqbs=; b=T84gPzenBLipwWXMLyNLS8wHcJboOQDcZ+hiP+T24usAlnwF7o6OgfSWEp4+y0lVdVIPCJ 2xDR4mWyKrE/s5woLjia87k2xcCDjxR0mplC9BlKi/NJhgFlqfOIesCapTKCuPK0gUVByT 3Yn1vnt1py8nyRQ61rPIWuEylgtLW7Q= 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-169-jmHSCGkANleXDaHYHeFrNA-1; Wed, 19 Apr 2023 07:18:51 -0400 X-MC-Unique: jmHSCGkANleXDaHYHeFrNA-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 59BDC101A54F; Wed, 19 Apr 2023 11:18:49 +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 75C83492B05; Wed, 19 Apr 2023 11:18:48 +0000 (UTC) Received: by tpad.localdomain (Postfix, from userid 1000) id C0514401344A1; Wed, 19 Apr 2023 08:01:41 -0300 (-03) Date: Wed, 19 Apr 2023 08:01:41 -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> <20230406133206.GN386572@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230406133206.GN386572@hirez.programming.kicks-ass.net> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Rspam-User: X-Rspamd-Server: rspam03 X-Stat-Signature: ej5m7z4p6fucmtd1oueto41ik66itcw1 X-Rspamd-Queue-Id: CD58B1C000D X-HE-Tag: 1681903133-101855 X-HE-Meta: U2FsdGVkX1+88tqrYM/FSueP6Ka9kQDoyL+rvZBna0ix79/ITam4HwhdpAa0xpzPuUEtwZc7PG1F3e1bf94yKBgXmghxz3s9FXa/wdmQRRirnCNBzvYDhA7ULdCAdwfxtdUhdhS6eUbKJQbFnQJUfXA5ueFHFKy2hBTncvSlGGP7aQsYyeH3ZnIx+dt8J28UOdYCTVy/JrqWbUjaZSbDEPaLEGtye2sAHY69+r8DaEoNp0NFp0Bgrdr+Hn5oFX+3VrXbkMjQrnuEWS+MAdXcHWC4HHCbXqvX7jxJuoZ5Pqe82sv4aCN12QNgR1PNMpHICSSNTVGGn7rVJ4y7+IKcviO/pS/YkoVn8AH/7e6s/KXzSruFkYm3vw/tRdxFTY6t2ib6vN8EFi/N6jkRZXi1PHNinKXl6waTrgfulp6C1mwyx1EUHpF5rKCXldw+tLX/bUrjXsePulchRmV+8VIrJ9aUFEkMYwZNO3fFddVIC9AWYlwp8nsPY/6wNf9ANOYzXSlBn8Oxz/D7rOxv6vFBYjOB+0DVkJbvRaVn8ZOMhut5CDtzrico2oSHbN3+3nG+dVDV0lQoxV+lJybI3oEzT3YVS+bPqqui1p/rbNyeRxDBFe4Q45ZREDveKYsJJLTvuk8jfPSKxFyOZBymIZ6aqtLJTzjh/hQTZoAjnBv6wrJUSiZXI5LjJ4oY1hU8bdZ1JLxvVdXjYNqN2XiWxnkuChQ4Nbpox52vEJs1W1qRdWPrWxV0Sqik6IGkhwhDQQWDr+FjDjRiv7qk1F1YdwsK5Z7VzVFLycOxnAUG8Tt27oVKIm/ZUS7FU3rEj+OiEGGcfGYYTnpm8oqkOECQ3WH74cIoa2sRqrHyMWQqfziCFkIWRaR/nZjd/SY9tvI8BsILF2ttOix51poj3/eVtzRJVwjZWi/Azp+4PmXnd/WQ9asTIMEu34Tu40ykV/dtBpXfelmTXkp1q2OO8h1mykS wYWFCvCt zH9BRQgKTZ/e438IzvuIKogQ/QuhLmDrIgVyVmqMkk3Am/qYLOULuynnSsj9fJnTkdOMhUC5J5eZnLCow3gR5OKJ8/bAyttvEqcC5VLt+yFIPyk7nUFDy+N4GgevcTrt/Tq3sQu4wKwMkb3rwGqKsJ0VLlUy/BLA0jWTjCwqGB4MEdZrWpXcQpo2VDsU7DUBINY7W2Q4YzZa3OBQ/ciNW+BJBogePlMs96DAsLVqaJpM7leRhb8RpiInZhBOcJfN5IDBpahz9MOHeh0C8vbh/x3I41yXfekD+E/gHSNGiYWPNYAVMyF0CSDYjXw== 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 03:32:06PM +0200, Peter Zijlstra wrote: > 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. On the field (what end-users do on production): cyclictest runs on NOHZ_FULL cores. PLC type programs run on NOHZ_FULL cores. So accordingly to physical reality i observe, i am not deluded. > > 2) PLC programs (nanosleep) > > What's a PLC? Programmable Logic Circuit? Programmable logic controller. > > A system call does not necessarily have to take locks, does it ? > > This all is unrelated to locks OK. > > 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. Not sure what you mean. > > This reduces the flexibility of developing such applications. > > Yeah, that's the cards you're dealt, deal with it. This is not what happens on the field.