Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3993996ybp; Mon, 7 Oct 2019 01:11:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqw0PXUCARxFZsNTc+VmiD6lr4+40MNmDy2RY9sqiuv/WGVV/cRCczJNfAa35X6FlBtWEhrZ X-Received: by 2002:a50:e613:: with SMTP id y19mr27728559edm.290.1570435860248; Mon, 07 Oct 2019 01:11:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570435860; cv=none; d=google.com; s=arc-20160816; b=hV1poHC4WbyMJ6uWVJ4tr2tRuqxEsZka0Jbt/bUpvyT/yo4qfBDPOW+nuPrsDWYA+s YtVdwpPnBUs/3LhLxVpLayXI/ZnUdfUt2hnIUOOaNg7Gyd5OIMcIf4mkoWKTpqq3FqYR UIbVisQ0RwYjYJERpCP7VNwuNtY/OOtl7LnzF2Ueu8RBqplFaXGe+7bCY8FqYP+1Sz6V zXoFcKGZUWRkd/yxueb57T+DRFMwJ5JPdSIVQ+e/nSEYDVnL6kK1Wzjd9PPGT2EBIuPk nu5OFjXSeO+BSU5m33ePctHqC9qFIrXD3wE0rSRn2saZU/lVzr0JF6/hs9avCL7lkvjD IxRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=dabwxm5vomV9WWpSNJ4FIDOpR0IeyzpWs0EaA1S3EiA=; b=M2mN1Dt+tf3iYRR9AiRzHjJbO3RE8nhkgDET+nnSTxufEwNCckGqbgM2VDT7BawmC9 WGQfMU8YIgwx+6n8Of/WctrvIvOPutGgMVKgyOViONstfbJazTTkhine5ihDJo9UqagA wtq0N2JQ0VQ93Wjn79BMgMflm146tXCkmvqSC0EmcqxU+w5ByfC9E0lIa6GnYNTMVVV1 OC6SH57Dsf6rumI0pW0vy4nimnjG1cwEluGifkZTX2AJN3hJTG/sVinLABfDREuD47kZ kZRt2EO4Lzkpohk+LivzpbOLNd17I2mmEfuhzI3uYo6cFolZpNtNuPebBWl78Y+U1pcf MeLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=trfi+lAP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fj16si6712753ejb.385.2019.10.07.01.10.36; Mon, 07 Oct 2019 01:11:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=trfi+lAP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727410AbfJGIJR (ORCPT + 99 others); Mon, 7 Oct 2019 04:09:17 -0400 Received: from merlin.infradead.org ([205.233.59.134]:56642 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726889AbfJGIJR (ORCPT ); Mon, 7 Oct 2019 04:09:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; 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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=dabwxm5vomV9WWpSNJ4FIDOpR0IeyzpWs0EaA1S3EiA=; b=trfi+lAPvWdu8emeBU815dHdQ 2QF+TogFvMx/2Np7wR/Cyq0n3QAL+LcrjhBEPtsnFVNRk1ewdsXeKXqwLOAAsqa1QMyP3P7sM3SDm XSab0yll7C2SBecvBVvT72N7eG6xms1DQH5Rv/yrwakvkdyTacVD4+weEwNH79k+hpUwP2cHLD7UA 47K00aA77rmP/5UP4Wqf+K/kq201UJtItVoxljr8W5E4gHCKK1aF2yzMfa1aK5jKXNFEhvGGQ9Fen vOrRguQgFi1UoJ/OWRIgEVG8qDsqYsT9X4ADts2VJtZoa99tSHvTT6gnJvslljoVYKSiHOC08SgvK Eisa+fKYw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.2 #3 (Red Hat Linux)) id 1iHO4a-0008JO-Gi; Mon, 07 Oct 2019 08:08:53 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 1BA93305803; Mon, 7 Oct 2019 10:07:57 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id ED45E20245BB0; Mon, 7 Oct 2019 10:08:47 +0200 (CEST) Date: Mon, 7 Oct 2019 10:08:47 +0200 From: Peter Zijlstra To: Daniel Bristot de Oliveira Cc: Steven Rostedt , linux-kernel@vger.kernel.org, x86@kernel.org, Nadav Amit , Andy Lutomirski , Dave Hansen , Song Liu , Masami Hiramatsu Subject: Re: [PATCH 3/3] x86/ftrace: Use text_poke() Message-ID: <20191007080847.GB2311@hirez.programming.kicks-ass.net> References: <20190827180622.159326993@infradead.org> <20190827181147.166658077@infradead.org> <20191002182106.GC4643@worktop.programming.kicks-ass.net> <20191003181045.7fb1a5b3@gandalf.local.home> <7b4196a4-b6e1-7e55-c3e1-a02d97c262c7@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7b4196a4-b6e1-7e55-c3e1-a02d97c262c7@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 04, 2019 at 10:10:47AM +0200, Daniel Bristot de Oliveira wrote: > 1) the enabling/disabling ftrace path > 2) the int3 path - if a thread/irq is running a kernel function > 3) the IPI - that affects all CPUs, even those that are not "hitting" trace > code, e.g., user-space. > > The first one is for sure a cold-path. The second one is a hot-path: any task > running kernel functions will hit it. But IMHO, the hottest one is the IPIs, > because it will run on all CPUs, e.g., even isolated CPUs that are running in > user-space. Well, we can fix that, just like RCU. In fact, I suspect RCU has all the bits required to cure this. For NOHZ_FULL CPUs you can forgo the IPI and delay it until the next kernel entry, just like RCU.