Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2532371ybk; Mon, 18 May 2020 01:14:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQqidzxY9sISd1E59bVs7o7e5XQd1Zhoq9ou6o2hbOsk6OXSGLPpP+mdaxnbQjpGI267HC X-Received: by 2002:a17:906:c943:: with SMTP id fw3mr14201077ejb.288.1589789698052; Mon, 18 May 2020 01:14:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589789698; cv=none; d=google.com; s=arc-20160816; b=rZIC6pDGW+3JsHszBPVW7QNZYlEgZ0cYzSyIpIjnFIN/mHXcNbP9z9Vg81iWytddtn iBXID3kkEphLJQ/z/+r120FNooO3eqndj0rn9OdDS+8tyOqxlXUTzPHLyYrd2D5JyjTz lO5EPv4K7Rz3mfDA9TKaqB93s3IA0U7JEJSN8txjF51vxyAP8Q6GMiiQVq6cmzWTOVNB HRQmfpLcUVr8BaOaA1FIZdprVy821TrvW+gwLeMqQ/5RBjyTkMtnxQH1RqmloVSlU3oY tJDcWMj7lg6xKqCm7ao653rum023n5Ma+4dNfRmGlnHM7AeswleUzmEnMkhTmt1JQHmq suhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Iqm24iEcNucTMf6Splm9sZE31pThskAEE0cgautDMiA=; b=EjgPMU61rmkSGMzw71SRfPrliEpH9AIVuw9WZUBfHKRKF6Jq8Ead8Sybx8KkSyFcIX PccFHnhYHuZeIGK4nSnKzFJs96u1ur9KQ1Iqbb9K1abvf0RL1IlbkG6RklX4mWlKi46O 9Zrf2rw2AetKj0wCjlgdgKEikf8g65zJph5vQ4x665xVCPKKlIDKdnvYxM4JDG8lNo3I 0oQJFXFnNYaTX8SpP4+0DQmElZ7Vrl/k4bjBgsz3/H216LNXy54IYIXHGSrBj4PgRsq5 3cwfmMs2nllu3MxbauHxDfre2mVNNe1TKWxi+v+ziGwfAF84DgExYcXXXIhCT4W5lirI gaog== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=CxtilwHR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ov7si6228758ejb.409.2020.05.18.01.14.34; Mon, 18 May 2020 01:14:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=CxtilwHR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726932AbgERIKy (ORCPT + 99 others); Mon, 18 May 2020 04:10:54 -0400 Received: from merlin.infradead.org ([205.233.59.134]:56720 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726489AbgERIKy (ORCPT ); Mon, 18 May 2020 04:10:54 -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; bh=Iqm24iEcNucTMf6Splm9sZE31pThskAEE0cgautDMiA=; b=CxtilwHRWrNOBYZqwwg63gS68t zfiFiPm0vagijAvdVfx3a1AMm1nlTz8fkXw7mt8X/YMhiRtmNL8jGMgonq13QHfGmgun8wTaBWqhg SYxW/+LrdoeX7B3ihWGRweAm5ZW4I2hibuF42qRBaEnKRcGch8hmCDbZ48TJlbAqmG3SWeBUbQIhr iuYAL7yOC8m0xDWFr9vpKEXh1c58RV6pQWhtgWKSRSUvYmW13v0YovB4E8zuGxC3QBnEWv3vn72KB 0z6kctMotILE430FP6CvS+yKlkSqAYujqXv/nQuqjKpv4ytJ1ydYoZOux2AF4jm7nBfXTtvmVKD5R nhSQe2OA==; 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.3 #3 (Red Hat Linux)) id 1jaaoq-0003ab-HU; Mon, 18 May 2020 08:08:16 +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 53F92306089; Mon, 18 May 2020 10:08:14 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 0D79B2B3CDC70; Mon, 18 May 2020 10:08:14 +0200 (CEST) Date: Mon, 18 May 2020 10:08:14 +0200 From: Peter Zijlstra To: Thomas Gleixner Cc: LKML , x86@kernel.org, "Paul E. McKenney" , Andy Lutomirski , Alexandre Chartre , Frederic Weisbecker , Paolo Bonzini , Sean Christopherson , Masami Hiramatsu , Petr Mladek , Steven Rostedt , Joel Fernandes , Boris Ostrovsky , Juergen Gross , Brian Gerst , Mathieu Desnoyers , Josh Poimboeuf , Will Deacon , Tom Lendacky , Wei Liu , Michael Kelley , Jason Chen CJ , Zhao Yakui Subject: Re: [patch V6 04/37] x86: Make hardware latency tracing explicit Message-ID: <20200518080814.GJ2940@hirez.programming.kicks-ass.net> References: <20200515234547.710474468@linutronix.de> <20200515235124.783722942@linutronix.de> <20200518080133.GI2940@hirez.programming.kicks-ass.net> <874ksdzmzf.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <874ksdzmzf.fsf@nanos.tec.linutronix.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 18, 2020 at 10:05:56AM +0200, Thomas Gleixner wrote: > Peter Zijlstra writes: > > On Sat, May 16, 2020 at 01:45:51AM +0200, Thomas Gleixner wrote: > >> --- a/arch/x86/kernel/nmi.c > >> +++ b/arch/x86/kernel/nmi.c > >> @@ -334,6 +334,7 @@ static noinstr void default_do_nmi(struc > >> __this_cpu_write(last_nmi_rip, regs->ip); > >> > >> instrumentation_begin(); > >> + ftrace_nmi_handler_enter(); > >> > >> handled = nmi_handle(NMI_LOCAL, regs); > >> __this_cpu_add(nmi_stats.normal, handled); > >> @@ -420,6 +421,7 @@ static noinstr void default_do_nmi(struc > >> unknown_nmi_error(reason, regs); > >> > >> out: > >> + ftrace_nmi_handler_exit(); > >> instrumentation_end(); > >> } > > > > Yeah, so I'm confused about this and the previous patch too. Why not > > do just this? Remove that ftrace_nmi_handler.* crud from > > nmi_{enter,exit}() and stick it here? Why do we needs the > > nmi_{enter,exit}_notrace() thing? > > Because you then have to fixup _all_ architectures which use > nmi_enter/exit(). We probably have to anyway. But I can do that later I suppose.