lkml.org 
[lkml]   [2021]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v3] perf/core: Set event shadow time for inactive events too
    On Sat, Dec 18, 2021 at 09:09:05AM +0000, Song Liu wrote:
    >
    >
    > > On Dec 17, 2021, at 8:35 AM, Peter Zijlstra <peterz@infradead.org> wrote:
    > >
    > > On Fri, Dec 10, 2021 at 11:33:41AM +0100, Peter Zijlstra wrote:
    > >
    > >> I'm thinking this is a cgroup specific thing. Normally the shadow_time
    > >> thing is simply a relative displacement between event-time and the
    > >> global clock. That displacement never changes, except when you do
    > >> IOC_DISABLE/IOC_ENABLE.
    > >>
    > >> However, for cgroup things are different, since the cgroup events aren't
    > >> unconditionally runnable, that is, the enabled time should only count
    > >> when the cgroup is active, right?
    > >>
    > >> So perhaps perf_event_read_local() should use a cgroup clock instead of
    > >> perf_clock() for cgroup events.
    > >>
    > >> Let me think about that some more...
    > >
    > > How's this then? Song, could you also please test and or better explain
    > > the problem f79256532682 pretends to cure? Because the below is
    > > reverting that, I *really* hate having to touch the events we're not
    > > scheduling.
    >
    > Unfortunately, this change bring the bug back. For time_enabled in rdpmc
    > case to work properly, we have to touch all the enabled but not running
    > events, right?

    Ohh.. argh. I think I see why, it looses the context time enable edge,
    and because this is all strictly per-event in the uapi (there is no ctx
    representation) it can't be cured by improving ctx time handling :/

    Bah, I so hate this.

    \
     
     \ /
      Last update: 2021-12-20 10:31    [W:3.642 / U:0.084 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site