From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 02FA5263F4E for ; Tue, 25 Mar 2025 17:52:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742925164; cv=none; b=I4Y0R+zMWn2wPwaqWc8/VsCuDBbb1YZMXAKyeARV2XWM+4JfRxt2MVORgpvMJLcsAX2QZg+2W0chIeOYk9xuFzx7aJWx8uIYBvtEsJCE1TE/QAAo/bFni1neks1uuzikKGrGTmK2b9geYmJaJCOCix2ebowgdpYSEwt3ei2KeMc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742925164; c=relaxed/simple; bh=rqgWaiOeIHt4zG94xEwnMSEUgdwajlC/lHAStnrVhlo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=ugw9+a9OdEhfHl8RgI0bAhsGBBpZlN+AjxHHNQG3S6PP4Rx2u7IoBpWZqkjPfIrMw166bXAmkagWQYJ8R2a1/tCh4YY+ONIjkbogqkd5Nguwhm1U2OYZNjD/IjVuWMplAQzqgYajTPfLMm5fKy4Wub+et2UyjXIl1HaYSsoR+dM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=G12cdrLZ; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="G12cdrLZ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1742925161; 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=58+r+FAQ5TTby/P3+2e15XArHywgR9oB31F4zzKw58o=; b=G12cdrLZiH2O0I4Fg9LV2QgbNKilLkFryvzQoZqQyrdz4IU7BXV+H8AgVX+ixYY3mzjs0J pr8rcxZr3R2Od8PodkTO80jh4WHY8KNzNIjFL+0u585isJEqAChbTEthKR4TJWoPYyrqkh Lpm5nAIXo8zJzGyw9V+1NuhsjdY9mtU= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-93-_eUO-pdrPiaQEyz5Rf7iag-1; Tue, 25 Mar 2025 13:52:40 -0400 X-MC-Unique: _eUO-pdrPiaQEyz5Rf7iag-1 X-Mimecast-MFC-AGG-ID: _eUO-pdrPiaQEyz5Rf7iag_1742925159 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-43d51bd9b41so39098465e9.3 for ; Tue, 25 Mar 2025 10:52:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742925159; x=1743529959; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=58+r+FAQ5TTby/P3+2e15XArHywgR9oB31F4zzKw58o=; b=ct2kJoU6hGW7fq/c8nm0DivLn4pLYf2z8jKEQd4/j3JK24/BWHDbODsbg+mZiGqUfh skeNAIwcQ/wZKOo9wHi+r7mHyn0f05ElrJYg/BY1tBb7dijkW09zXniC+qo+FdG5M8ne GA0F8MCq5bDY8Vpho2/KyVfOv3VqIZtcNMge9fJBfIFGHRukckEQm/CDd3FvXjHpNkjR yncA9y6LJ7eh3PhfyyIcp9x3mYp9ujl7aJLddoh91U26P7yT2ttK2mA1niyN7Ny3Iobo k7IphQeYKCt1FXbzu2WsogZT809MWourw/T21f0ayaJrS2OhlU1oI8k36FzgJy4l3mVe 6qaw== X-Forwarded-Encrypted: i=1; AJvYcCUCfhx/fKHxgCCAx6ZXqZNxsy4uxuxVO9p0qolEUMIRb+0TU0q8S7Tx+DFMScNb3ogS7Tj/g/DYdfwoeNEJmLcN@vger.kernel.org X-Gm-Message-State: AOJu0YzOqlqX6J+KghZxrzgyVhqoEI4bL0vqkUSsCx5dQM1wsuWNv02B f9QwxHnPm1tyI1xJ3TpSHmmXI+Tz7VLh24ZD3C/HhUvoiVrBKNL/iDXsyXFbZDhLnZQYt582tVD 5PlaGMpWOjOudDHDoUt0ks6ur83GIqtSv4hi1dHEy5MEzvFBniKE2QoiK3U7gXZRXrsQ= X-Gm-Gg: ASbGncvDPB5yAr4kDShUmyTa4ZzOTP7Ow1rI55SumlryTNnXu0gOJckflC/PM6asa8v /RfXUitds1GE7VelRn8bIPPnmVjQpJaIW0TFcZazFcW3HrzUtWLBIcRfuvxi4k//EJd7SRLfEsJ 1KsJvUAUNdGi1jdAhDcmQa64RPA6N/ERrYt85nkDGgtKjPERPfhwnxGl5GswGedY2OEad+TOq+P 1Crm+/PsgfFC7yNc7pry+deO5MABhHUh1dIidupvNf//TQnl+zR5NvPD8/7EfNcXsKvchUdaqyk F9NrCvK/cWvtRrSHObuJM0t1Nk/HoGeJzpw286eGhUNN59vN10OIlu7EILFYry491aXqgwjndau / X-Received: by 2002:a05:600c:4584:b0:43c:fe85:e4ba with SMTP id 5b1f17b1804b1-43d509f4b25mr191666595e9.15.1742925159180; Tue, 25 Mar 2025 10:52:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFE+waNkOHjpFuU78xXxVfBVrthL7+/n2itqapsAHnKkAlkbjOyC6OGUhEtlUEcPF/6kvS3dA== X-Received: by 2002:a05:600c:4584:b0:43c:fe85:e4ba with SMTP id 5b1f17b1804b1-43d509f4b25mr191665765e9.15.1742925158655; Tue, 25 Mar 2025 10:52:38 -0700 (PDT) Received: from vschneid-thinkpadt14sgen2i.remote.csb (213-44-141-166.abo.bbox.fr. [213.44.141.166]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3997f9b409fsm14543767f8f.50.2025.03.25.10.52.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Mar 2025 10:52:37 -0700 (PDT) From: Valentin Schneider To: Dave Hansen , Jann Horn Cc: linux-kernel@vger.kernel.org, x86@kernel.org, virtualization@lists.linux.dev, linux-arm-kernel@lists.infradead.org, loongarch@lists.linux.dev, linux-riscv@lists.infradead.org, linux-perf-users@vger.kernel.org, xen-devel@lists.xenproject.org, kvm@vger.kernel.org, linux-arch@vger.kernel.org, rcu@vger.kernel.org, linux-hardening@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, bpf@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, Juergen Gross , Ajay Kaher , Alexey Makhalov , Russell King , Catalin Marinas , Will Deacon , Huacai Chen , WANG Xuerui , Paul Walmsley , Palmer Dabbelt , Albert Ou , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Peter Zijlstra , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , "Liang, Kan" , Boris Ostrovsky , Josh Poimboeuf , Pawan Gupta , Sean Christopherson , Paolo Bonzini , Andy Lutomirski , Arnd Bergmann , Frederic Weisbecker , "Paul E. McKenney" , Jason Baron , Steven Rostedt , Ard Biesheuvel , Neeraj Upadhyay , Joel Fernandes , Josh Triplett , Boqun Feng , Uladzislau Rezki , Mathieu Desnoyers , Lai Jiangshan , Zqiang , Juri Lelli , Clark Williams , Yair Podemsky , Tomas Glozar , Vincent Guittot , Dietmar Eggemann , Ben Segall , Mel Gorman , Kees Cook , Andrew Morton , Christoph Hellwig , Shuah Khan , Sami Tolvanen , Miguel Ojeda , Alice Ryhl , "Mike Rapoport (Microsoft)" , Samuel Holland , Rong Xu , Nicolas Saenz Julienne , Geert Uytterhoeven , Yosry Ahmed , "Kirill A. Shutemov" , "Masami Hiramatsu (Google)" , Jinghao Jia , Luis Chamberlain , Randy Dunlap , Tiezhu Yang Subject: Re: [PATCH v4 29/30] x86/mm, mm/vmalloc: Defer flush_tlb_kernel_range() targeting NOHZ_FULL CPUs In-Reply-To: <408ebd8b-4bfb-4c4f-b118-7fe853c6e897@intel.com> References: <20250114175143.81438-1-vschneid@redhat.com> <20250114175143.81438-30-vschneid@redhat.com> <352317e3-c7dc-43b4-b4cb-9644489318d0@intel.com> <408ebd8b-4bfb-4c4f-b118-7fe853c6e897@intel.com> Date: Tue, 25 Mar 2025 18:52:34 +0100 Message-ID: Precedence: bulk X-Mailing-List: linux-perf-users@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On 20/02/25 09:38, Dave Hansen wrote: > But, honestly, I'm still not sure this is worth all the trouble. If > folks want to avoid IPIs for TLB flushes, there are hardware features > that *DO* that. Just get new hardware instead of adding this complicated > pile of software that we have to maintain forever. In 10 years, we'll > still have this software *and* 95% of our hardware has the hardware > feature too. Sorry, you're going to have to deal with my ignorance a little bit longer... Were you thinking x86 hardware specifically, or something else? AIUI things like arm64's TLBIVMALLE1IS can do what is required without any IPI: C5.5.78 """ The invalidation applies to all PEs in the same Inner Shareable shareability domain as the PE that executes this System instruction. """ But for (at least) these architectures: alpha x86 loongarch mips (non-freescale 8xx) powerpc riscv xtensa flush_tlb_kernel_range() has a path with a hardcoded use of on_each_cpu(), so AFAICT for these the IPIs will be sent no matter the hardware.