lkml.org 
[lkml]   [2017]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH v6 1/3] perf/core: use rb trees for pinned/flexible groups
    Date
    Alexey Budankov <alexey.budankov@linux.intel.com> writes:

    >>> Iterating cpu specific subtree like this:
    >>>
    >>> #define for_each_group_event(event, group, cpu, pmu, field) \
    >>> for (event = rb_entry_safe(group_first(group, cpu, pmu), \
    >>> typeof(*event), field); \
    >>> event && event->cpu == cpu && event->pmu == pmu; \
    >>> event = rb_entry_safe(rb_next(&event->field), \
    >>> typeof(*event), field))
    >>
    >> Afaict, this assumes that you are also ordering on event->pmu, which
    >> should be reflected in your _less function. And also assuming that
    >> group_first() is doing the right thing. Can we see the code?
    >
    > I didn't do ordering by PMU for this patch set. Yet more I implemented
    > groups_first() like this:

    Your iterator (quoted above) begs to differ.

    Regards,
    --
    Alex

    \
     
     \ /
      Last update: 2017-08-30 12:19    [W:4.802 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site