From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751083AbdE3TDu (ORCPT ); Tue, 30 May 2017 15:03:50 -0400 Received: from merlin.infradead.org ([205.233.59.134]:52604 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751039AbdE3TDt (ORCPT ); Tue, 30 May 2017 15:03:49 -0400 Date: Tue, 30 May 2017 21:03:39 +0200 From: Peter Zijlstra To: Alexei Starovoitov Cc: "David S . Miller" , Brendan Gregg , Daniel Borkmann , Teng Qin , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 net-next 1/3] perf, bpf: Add BPF support to all perf_event types Message-ID: <20170530190339.svpp53bggfznc476@hirez.programming.kicks-ass.net> References: <20170526055549.557818-1-ast@fb.com> <20170526055549.557818-2-ast@fb.com> <20170529091253.lopsd33qticsbgii@hirez.programming.kicks-ass.net> <20170529093918.xmbijgozjrfi22ru@hirez.programming.kicks-ass.net> <20170530165102.kvcutyfp6i2in2zx@hirez.programming.kicks-ass.net> <132719d0-a18c-d4a0-8e72-56658c0c344f@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <132719d0-a18c-d4a0-8e72-56658c0c344f@fb.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 30, 2017 at 10:37:46AM -0700, Alexei Starovoitov wrote: > On 5/30/17 9:51 AM, Peter Zijlstra wrote: > > I'm not entirely sure I see how that is required. Should per task not > > already work? The WARN that's there will only trigger if you call them > > on the wrong task, which is something you shouldn't do anyway. > > The kernel WARN is considered to be a bug of bpf infra. That's the > reason we do all these checks at map update time and at run-time. > The bpf program authors should be able to do all possible experiments > until their scripts work. Dealing with kernel warns and reboots is not > something user space folks like to do. > Today bpf_perf_event_read() for per-task events isn't really > working due to event->oncpu != cpu runtime check in there. > If we convert warns to returns the existing scripts will continue > to work as-is and per-task will be possible. Ah yes.. I always forget that side of things (not ever having seen a bpf thing working doesn't help either of course). Let me consider that for a bit..