linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qais Yousef <qais.yousef@arm.com>
To: Phil Auld <pauld@redhat.com>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>,
	vincent.donnefort@arm.com, mingo@redhat.com,
	peterz@infradead.org, vincent.guittot@linaro.org,
	linux-kernel@vger.kernel.org, valentin.schneider@arm.com
Subject: Re: [PATCH v2] sched/debug: Add new tracepoint to track cpu_capacity
Date: Tue, 8 Sep 2020 16:22:15 +0100	[thread overview]
Message-ID: <20200908152214.d7sjawnmnkytv7vk@e107158-lin.cambridge.arm.com> (raw)
In-Reply-To: <20200908131954.GA147026@lorien.usersys.redhat.com>

On 09/08/20 09:19, Phil Auld wrote:
> Hi Quais,
> 
> On Mon, Sep 07, 2020 at 12:02:24PM +0100 Qais Yousef wrote:
> > On 09/02/20 09:54, Phil Auld wrote:
> > > > 
> > > > I think this decoupling is not necessary. The natural place for those
> > > > scheduler trace_event based on trace_points extension files is
> > > > kernel/sched/ and here the internal sched.h can just be included.
> > > > 
> > > > If someone really wants to build this as an out-of-tree module there is
> > > > an easy way to make kernel/sched/sched.h visible.
> > > >
> > > 
> > > It's not so much that we really _want_ to do this in an external module.
> > > But we aren't adding more trace events and my (limited) knowledge of
> > > BPF let me to the conclusion that its raw tracepoint functionality
> > > requires full events.  I didn't see any other way to do it.
> > 
> > I did have a patch that allowed that. It might be worth trying to upstream it.
> > It just required a new macro which could be problematic.
> > 
> > https://github.com/qais-yousef/linux/commit/fb9fea29edb8af327e6b2bf3bc41469a8e66df8b
> > 
> > With the above I could attach using bpf::RAW_TRACEPOINT mechanism.
> >
> 
> Yeah, that could work. I meant there was no way to do it with what was there :)
> 
> In our initial attempts at using BPF to get at nr_running (which I was not
> involved in and don't have all the details...) there were issues being able to
> keep up and losing events.  That may have been an implementation issue, but
> using the module and trace-cmd doesn't have that problem. Hopefully you don't
> see that using RAW_TRACEPOINTs.

I haven't played with that since then tbh. I use BPF every now and then, but
rather simplistically. So if I encoutnered such a problem I wouldn't have
noticed.

> Fwiw, I don't think these little helper routines are all that hard to maintain.
> If something changes in those fields, which seems moderately unlikely at least
> for many of them, the compiler will complain.
> 
> And I agree with you about preferring to use the public headers for the module.
> I think we can work around it though, if needed.

+1

Cheers

--
Qais Yousef

  reply	other threads:[~2020-09-08 20:05 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-28  9:00 [PATCH v2] sched/debug: Add new tracepoint to track cpu_capacity vincent.donnefort
2020-08-28 10:27 ` Qais Yousef
2020-08-28 17:10   ` Dietmar Eggemann
2020-08-28 17:26     ` Qais Yousef
2020-09-02 10:44       ` Dietmar Eggemann
2020-09-02 13:54         ` Phil Auld
2020-09-07 11:02           ` Qais Yousef
2020-09-08 13:19             ` Phil Auld
2020-09-08 15:22               ` Qais Yousef [this message]
2021-01-04 18:26               ` Qais Yousef
2021-01-04 18:59                 ` Alexei Starovoitov
2021-01-05 11:38                   ` Qais Yousef
2021-01-05 16:44                     ` Alexei Starovoitov
2021-01-06 11:27                       ` Qais Yousef
2021-01-06 23:42                         ` Andrii Nakryiko
2021-01-07 11:23                           ` Qais Yousef
2021-01-11 14:04                 ` Peter Zijlstra
2021-01-11 14:08                   ` Qais Yousef
2020-09-07 10:48         ` Qais Yousef
2020-09-07 11:13           ` peterz
2020-09-07 14:51             ` Qais Yousef
2020-09-08 11:17               ` Dietmar Eggemann
2020-09-08 15:17                 ` Qais Yousef
2020-09-08 16:17                   ` Dietmar Eggemann
2021-01-04 15:18             ` Qais Yousef
2020-10-05  7:43 ` [tip: sched/core] " tip-bot2 for Vincent Donnefort

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200908152214.d7sjawnmnkytv7vk@e107158-lin.cambridge.arm.com \
    --to=qais.yousef@arm.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pauld@redhat.com \
    --cc=peterz@infradead.org \
    --cc=valentin.schneider@arm.com \
    --cc=vincent.donnefort@arm.com \
    --cc=vincent.guittot@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).