From: Peter Zijlstra <peterz@infradead.org>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Stephane Eranian <eranian@google.com>,
LKML <linux-kernel@vger.kernel.org>,
mingo@elte.hu, Paul Mackerras <paulus@samba.org>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [RFC] perf_events: ctx_flexible_sched_in() not maximizing PMU utilization
Date: Fri, 07 May 2010 10:44:38 +0200 [thread overview]
Message-ID: <1273221878.1642.320.camel@laptop> (raw)
In-Reply-To: <1273220736.1642.318.camel@laptop>
On Fri, 2010-05-07 at 10:25 +0200, Peter Zijlstra wrote:
> We are however still fully greedy, which is still O(n), which we don't
> want. However if we stop being greedy and use the same heuristic we do
> now, stop filling the PMU at the first fail, we'll still be fair,
> because the algorithm ensures that.
>
FWIW the non-greedy algorithm is O(m * log(n)), where m is the number of
counters on the PMU and n the number of competing events, since m is
pretty much a constant, we can say the full algorithm is O(log n).
next prev parent reply other threads:[~2010-05-07 8:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-06 14:03 [RFC] perf_events: ctx_flexible_sched_in() not maximizing PMU utilization Stephane Eranian
2010-05-06 14:20 ` Peter Zijlstra
2010-05-06 14:41 ` Stephane Eranian
2010-05-06 15:08 ` Peter Zijlstra
2010-05-06 16:26 ` Stephane Eranian
2010-05-06 17:11 ` Frederic Weisbecker
2010-05-06 17:30 ` Peter Zijlstra
2010-05-07 8:25 ` Peter Zijlstra
2010-05-07 8:44 ` Peter Zijlstra [this message]
2010-05-07 9:37 ` Stephane Eranian
2010-05-07 10:06 ` Peter Zijlstra
2010-05-07 10:49 ` Stephane Eranian
2010-05-07 11:15 ` Peter Zijlstra
2010-05-10 9:41 ` Stephane Eranian
2010-05-14 14:55 ` Peter Zijlstra
2010-05-14 15:07 ` Peter Zijlstra
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=1273221878.1642.320.camel@laptop \
--to=peterz@infradead.org \
--cc=davem@davemloft.net \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.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