Re: [PATCH 2/2] sched/debug: add sched_update_nr_running tracepoint

2019-09-09 Thread Qais Yousef
On 09/04/19 19:48, Peter Zijlstra wrote: > On Wed, Sep 04, 2019 at 03:37:11PM +0100, Qais Yousef wrote: > > > I managed to hook into sched_switch to get the nr_running of cfs tasks via > > eBPF. > > > > ``` > > int on_switch(struct sched_switch_args *args) { > > struct task_struct *prev = (st

Re: [PATCH 2/2] sched/debug: add sched_update_nr_running tracepoint

2019-09-05 Thread Alexei Starovoitov
On Thu, Sep 05, 2019 at 10:13:10AM +0200, Ingo Molnar wrote: > > * Alexei Starovoitov wrote: > > > On Wed, Sep 4, 2019 at 10:47 AM Peter Zijlstra wrote: > > > > > > On Wed, Sep 04, 2019 at 08:51:21AM -0700, Alexei Starovoitov wrote: > > > > Anything in tracing can be deleted. > > > > Tracing is

Re: [PATCH 2/2] sched/debug: add sched_update_nr_running tracepoint

2019-09-05 Thread Ingo Molnar
* Alexei Starovoitov wrote: > On Wed, Sep 4, 2019 at 10:47 AM Peter Zijlstra wrote: > > > > On Wed, Sep 04, 2019 at 08:51:21AM -0700, Alexei Starovoitov wrote: > > > Anything in tracing can be deleted. > > > Tracing is about debugging and introspection. > > > When underlying kernel code change

Re: [PATCH 2/2] sched/debug: add sched_update_nr_running tracepoint

2019-09-04 Thread Alexei Starovoitov
On Wed, Sep 4, 2019 at 10:47 AM Peter Zijlstra wrote: > > On Wed, Sep 04, 2019 at 08:51:21AM -0700, Alexei Starovoitov wrote: > > Anything in tracing can be deleted. > > Tracing is about debugging and introspection. > > When underlying kernel code changes the introspection points change as well. >

Re: [PATCH 2/2] sched/debug: add sched_update_nr_running tracepoint

2019-09-04 Thread Peter Zijlstra
On Wed, Sep 04, 2019 at 03:37:11PM +0100, Qais Yousef wrote: > I managed to hook into sched_switch to get the nr_running of cfs tasks via > eBPF. > > ``` > int on_switch(struct sched_switch_args *args) { > struct task_struct *prev = (struct task_struct *)bpf_get_current_task(); > struct c

Re: [PATCH 2/2] sched/debug: add sched_update_nr_running tracepoint

2019-09-04 Thread Peter Zijlstra
On Wed, Sep 04, 2019 at 08:51:21AM -0700, Alexei Starovoitov wrote: > Anything in tracing can be deleted. > Tracing is about debugging and introspection. > When underlying kernel code changes the introspection points change as well. Right; except when it breaks widely used tools; like say powertop

Re: [PATCH 2/2] sched/debug: add sched_update_nr_running tracepoint

2019-09-04 Thread Alexei Starovoitov
On Wed, Sep 4, 2019 at 8:40 AM Joel Fernandes wrote: > > On Wed, Sep 04, 2019 at 08:25:27AM -0700, Alexei Starovoitov wrote: > > On Wed, Sep 4, 2019 at 6:10 AM Joel Fernandes > > wrote: > > > > > > I wonder if this distinction of "tracepoint" being non-ABI can be > > > documented > > > somewher

Re: [PATCH 2/2] sched/debug: add sched_update_nr_running tracepoint

2019-09-04 Thread Joel Fernandes
On Wed, Sep 04, 2019 at 03:57:59PM +0100, Qais Yousef wrote: > On 09/04/19 10:41, Joel Fernandes wrote: > > On Wed, Sep 04, 2019 at 03:20:17PM +0100, Qais Yousef wrote: > > > On 09/04/19 09:06, Joel Fernandes wrote: > > > > > > > > > > It is actually true. > > > > > > > > > > But you need to make

Re: [PATCH 2/2] sched/debug: add sched_update_nr_running tracepoint

2019-09-04 Thread Joel Fernandes
On Wed, Sep 04, 2019 at 08:37:22AM -0700, Alexei Starovoitov wrote: > On Wed, Sep 4, 2019 at 8:33 AM Joel Fernandes wrote: > > > > On Wed, Sep 04, 2019 at 08:26:52AM -0700, Alexei Starovoitov wrote: > > > On Wed, Sep 4, 2019 at 6:14 AM Joel Fernandes > > > wrote: > > > > > > > > True. However, f

Re: [PATCH 2/2] sched/debug: add sched_update_nr_running tracepoint

2019-09-04 Thread Alexei Starovoitov
On Wed, Sep 4, 2019 at 8:33 AM Joel Fernandes wrote: > > On Wed, Sep 04, 2019 at 08:26:52AM -0700, Alexei Starovoitov wrote: > > On Wed, Sep 4, 2019 at 6:14 AM Joel Fernandes > > wrote: > > > > > > True. However, for kprobes-based BPF program - it does check for kernel > > > version to ensure th

Re: [PATCH 2/2] sched/debug: add sched_update_nr_running tracepoint

2019-09-04 Thread Joel Fernandes
On Wed, Sep 04, 2019 at 08:25:27AM -0700, Alexei Starovoitov wrote: > On Wed, Sep 4, 2019 at 6:10 AM Joel Fernandes wrote: > > > > I wonder if this distinction of "tracepoint" being non-ABI can be documented > > somewhere. I would be happy to do that if there is a place for the same. I > > really

Re: [PATCH 2/2] sched/debug: add sched_update_nr_running tracepoint

2019-09-04 Thread Joel Fernandes
On Wed, Sep 04, 2019 at 08:26:52AM -0700, Alexei Starovoitov wrote: > On Wed, Sep 4, 2019 at 6:14 AM Joel Fernandes wrote: > > > > True. However, for kprobes-based BPF program - it does check for kernel > > version to ensure that the BPF program is built against the right kernel > > version (in or

Re: [PATCH 2/2] sched/debug: add sched_update_nr_running tracepoint

2019-09-04 Thread Alexei Starovoitov
On Wed, Sep 4, 2019 at 6:14 AM Joel Fernandes wrote: > > True. However, for kprobes-based BPF program - it does check for kernel > version to ensure that the BPF program is built against the right kernel > version (in order to ensure the program is built against the right set of > kernel headers).

Re: [PATCH 2/2] sched/debug: add sched_update_nr_running tracepoint

2019-09-04 Thread Alexei Starovoitov
On Wed, Sep 4, 2019 at 6:10 AM Joel Fernandes wrote: > > I wonder if this distinction of "tracepoint" being non-ABI can be documented > somewhere. I would be happy to do that if there is a place for the same. I > really want some general "policy" in the kernel on where we draw a line in > the sand

Re: [PATCH 2/2] sched/debug: add sched_update_nr_running tracepoint

2019-09-04 Thread Qais Yousef
On 09/04/19 10:41, Joel Fernandes wrote: > On Wed, Sep 04, 2019 at 03:20:17PM +0100, Qais Yousef wrote: > > On 09/04/19 09:06, Joel Fernandes wrote: > > > > > > > > It is actually true. > > > > > > > > But you need to make the distinction between a tracepoint > > > > and a trace event first. > > >

Re: [PATCH 2/2] sched/debug: add sched_update_nr_running tracepoint

2019-09-04 Thread Joel Fernandes
On Wed, Sep 04, 2019 at 03:20:17PM +0100, Qais Yousef wrote: > On 09/04/19 09:06, Joel Fernandes wrote: > > > > > > It is actually true. > > > > > > But you need to make the distinction between a tracepoint > > > and a trace event first. > > > > I know this distinction well. > > > > > What Valen

Re: [PATCH 2/2] sched/debug: add sched_update_nr_running tracepoint

2019-09-04 Thread Qais Yousef
On 09/03/19 17:43, Radim Krčmář wrote: > The paper "The Linux Scheduler: a Decade of Wasted Cores" used several > custom data gathering points to better understand what was going on in > the scheduler. > Red Hat adapted one of them for the tracepoint framework and created a > tool to plot a heatmap

Re: [PATCH 2/2] sched/debug: add sched_update_nr_running tracepoint

2019-09-04 Thread Qais Yousef
On 09/04/19 09:06, Joel Fernandes wrote: > > > > It is actually true. > > > > But you need to make the distinction between a tracepoint > > and a trace event first. > > I know this distinction well. > > > What Valentin is talking about here is the *bare* > > tracepoint without any event associat

Re: [PATCH 2/2] sched/debug: add sched_update_nr_running tracepoint

2019-09-04 Thread Valentin Schneider
On 04/09/2019 14:13, Peter Zijlstra wrote: > On Tue, Sep 03, 2019 at 05:43:40PM +0200, Radim Krčmář wrote: > >> Red Hat adapted one of them for the tracepoint framework and created a >> tool to plot a heatmap of nr_running, where the sched_update_nr_running >> tracepoint is being used for fine gra

Re: [PATCH 2/2] sched/debug: add sched_update_nr_running tracepoint

2019-09-04 Thread Peter Zijlstra
On Tue, Sep 03, 2019 at 05:43:40PM +0200, Radim Krčmář wrote: > Red Hat adapted one of them for the tracepoint framework and created a > tool to plot a heatmap of nr_running, where the sched_update_nr_running > tracepoint is being used for fine grained monitoring of scheduling > imbalance. You sh

Re: [PATCH 2/2] sched/debug: add sched_update_nr_running tracepoint

2019-09-04 Thread Joel Fernandes
On Wed, Sep 04, 2019 at 10:14:48AM +0200, Peter Zijlstra wrote: > On Wed, Sep 04, 2019 at 12:23:10AM -0400, Joel Fernandes wrote: > > On Tue, Sep 03, 2019 at 05:05:47PM +0100, Valentin Schneider wrote: > > > On 03/09/2019 16:43, Radim Krčmář wrote: > > > > The paper "The Linux Scheduler: a Decade o

Re: [PATCH 2/2] sched/debug: add sched_update_nr_running tracepoint

2019-09-04 Thread Joel Fernandes
On Wed, Sep 04, 2019 at 11:43:33AM +0100, Qais Yousef wrote: > On 09/04/19 00:23, Joel Fernandes wrote: > > On Tue, Sep 03, 2019 at 05:05:47PM +0100, Valentin Schneider wrote: > > > On 03/09/2019 16:43, Radim Krčmář wrote: > > > > The paper "The Linux Scheduler: a Decade of Wasted Cores" used sever

Re: [PATCH 2/2] sched/debug: add sched_update_nr_running tracepoint

2019-09-04 Thread Qais Yousef
On 09/04/19 10:14, Peter Zijlstra wrote: > On Wed, Sep 04, 2019 at 12:23:10AM -0400, Joel Fernandes wrote: > > On Tue, Sep 03, 2019 at 05:05:47PM +0100, Valentin Schneider wrote: > > > On 03/09/2019 16:43, Radim Krčmář wrote: > > > > The paper "The Linux Scheduler: a Decade of Wasted Cores" used se

Re: [PATCH 2/2] sched/debug: add sched_update_nr_running tracepoint

2019-09-04 Thread Qais Yousef
On 09/04/19 00:23, Joel Fernandes wrote: > On Tue, Sep 03, 2019 at 05:05:47PM +0100, Valentin Schneider wrote: > > On 03/09/2019 16:43, Radim Krčmář wrote: > > > The paper "The Linux Scheduler: a Decade of Wasted Cores" used several > > > custom data gathering points to better understand what was g

Re: [PATCH 2/2] sched/debug: add sched_update_nr_running tracepoint

2019-09-04 Thread Peter Zijlstra
On Wed, Sep 04, 2019 at 12:23:10AM -0400, Joel Fernandes wrote: > On Tue, Sep 03, 2019 at 05:05:47PM +0100, Valentin Schneider wrote: > > On 03/09/2019 16:43, Radim Krčmář wrote: > > > The paper "The Linux Scheduler: a Decade of Wasted Cores" used several > > > custom data gathering points to bette

Re: [PATCH 2/2] sched/debug: add sched_update_nr_running tracepoint

2019-09-03 Thread chengjian (D)
On 2019/9/4 0:05, Valentin Schneider wrote: On 03/09/2019 16:43, Radim Krčmář wrote: The paper "The Linux Scheduler: a Decade of Wasted Cores" used several custom data gathering points to better understand what was going on in the scheduler. Red Hat adapted one of them for the tracepoint frame

Re: [PATCH 2/2] sched/debug: add sched_update_nr_running tracepoint

2019-09-03 Thread Joel Fernandes
On Tue, Sep 03, 2019 at 05:05:47PM +0100, Valentin Schneider wrote: > On 03/09/2019 16:43, Radim Krčmář wrote: > > The paper "The Linux Scheduler: a Decade of Wasted Cores" used several > > custom data gathering points to better understand what was going on in > > the scheduler. > > Red Hat adapted

Re: [PATCH 2/2] sched/debug: add sched_update_nr_running tracepoint

2019-09-03 Thread Valentin Schneider
On 03/09/2019 16:43, Radim Krčmář wrote: > The paper "The Linux Scheduler: a Decade of Wasted Cores" used several > custom data gathering points to better understand what was going on in > the scheduler. > Red Hat adapted one of them for the tracepoint framework and created a > tool to plot a heatm

[PATCH 2/2] sched/debug: add sched_update_nr_running tracepoint

2019-09-03 Thread Radim Krčmář
The paper "The Linux Scheduler: a Decade of Wasted Cores" used several custom data gathering points to better understand what was going on in the scheduler. Red Hat adapted one of them for the tracepoint framework and created a tool to plot a heatmap of nr_running, where the sched_update_nr_running