lkml.org 
[lkml]   [2011]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] perf_events: fix and improve x86 event scheduling
From
Date
On Mon, 2011-11-14 at 15:26 +0100, Stephane Eranian wrote:
> There is an edge from the source to all the events.
> There is an edge from all the counters to the sync.
> There is an edge between an event and a counter, if
> it can count the event.
>
> The capacity of any edge is 1.

Ah indeed.

So that gives:

E = e+e*c+c ~= O(c^2); since e<=c
V = 2+e+c ~= O(c)

Then going by:

http://en.wikipedia.org/wiki/Maximum_flow_problem

we have to stay away from Edmonds-Karp.

Ford-Fulkerson would end up being O(E * c) = O(c^3), since max |f| is c.
Which is pretty much identical to all these O(V^2 E) = O(c^3) as well.

Dinitz blocking flow with dynamic trees looks more interesting at O(c^2
log(c)). Push relabel with dynamic trees looks to be best at O(c^2),
since V^2/E ends up being c^2/c^2 = 1.

Creating the graph itself will be O(c^2) as well, due to E.




\
 
 \ /
  Last update: 2011-11-14 17:03    [W:0.046 / U:1.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site