Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1723206

Re: [PATCH v6 1/3] perf/core: use rb trees for pinned/flexible groups

From Alexander Shishkin <alexander.shishkin@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH v6 1/3] perf/core: use rb trees for pinned/flexible groups
Date 2017-08-30 13:20 +0200
Message-ID <uk9cm-7C1-3@gated-at.bofh.it> (permalink)
References (6 earlier) <ueNPb-4e6-3@gated-at.bofh.it> <ujPdE-3jM-21@gated-at.bofh.it> <uk6Hx-5Y8-25@gated-at.bofh.it> <uk8gj-733-23@gated-at.bofh.it> <uk8zF-79l-31@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Alexey Budankov <alexey.budankov@linux.intel.com> writes:

> On 30.08.2017 13:18, Alexander Shishkin wrote:
>> 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.
>
> What do you specifically mean? I am doing iterations like this:

I mean the code that you've shown before, which is quoted above. It's
difficult to tell why something's not working if you don't show the
code.

Regards,
--
Alex

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v6 1/3] perf/core: use rb trees for pinned/flexible groups Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2017-08-29 16:00 +0200
  Re: [PATCH v6 1/3] perf/core: use rb trees for pinned/flexible groups Alexey Budankov <alexey.budankov@linux.intel.com> - 2017-08-30 10:40 +0200
    Re: [PATCH v6 1/3] perf/core: use rb trees for pinned/flexible groups Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2017-08-30 12:20 +0200
      Re: [PATCH v6 1/3] perf/core: use rb trees for pinned/flexible groups Alexey Budankov <alexey.budankov@linux.intel.com> - 2017-08-30 12:40 +0200
        Re: [PATCH v6 1/3] perf/core: use rb trees for pinned/flexible groups Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2017-08-30 13:20 +0200
    Re: [PATCH v6 1/3] perf/core: use rb trees for pinned/flexible groups Alexey Budankov <alexey.budankov@linux.intel.com> - 2017-08-30 13:20 +0200
      Re: [PATCH v6 1/3] perf/core: use rb trees for pinned/flexible groups Alexey Budankov <alexey.budankov@linux.intel.com> - 2017-08-31 12:20 +0200

csiph-web