From: Gleb Natapov <gleb@redhat.com>
To: Stephane Eranian <eranian@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
linux-kernel@vger.kernel.org, mingo@elte.hu, asharma@fb.com,
vince@deater.net, wcohen@redhat.com
Subject: Re: perf_events: proposed fix for broken intr throttling (repost)
Date: Thu, 5 Jan 2012 15:19:08 +0200 [thread overview]
Message-ID: <20120105131908.GH31206@redhat.com> (raw)
In-Reply-To: <CABPqkBR2PmqVUF2XmTouLy5jDiDhFVgzBvcaMw-NqEksVjYg_w@mail.gmail.com>
On Thu, Jan 05, 2012 at 01:08:41PM +0000, Stephane Eranian wrote:
> Peter,
>
> I looked into this some more this morning. I don't think your proposed
> scheme can work.
> Unless, I misunderstood you, you were suggesting that we could perhaps
> use a lazy
> approach in perf_event_task_tick() and walk the event list only when
> we have, at least, one
> event to unthrottle, i.e., similar to what is done with nr_freq. That
> cannot work. The problem is
> that you'd let all events get throttled before you'd unthrottle them
> in the next timer tick.
> At each overflow, hwc->interrupt would get incremented until it
> reached MAX_INTERRUPTS.
> Then, the event would be stopped (throttled), you'd do
> ctx->nr_throttled = 1. At the next
> timer tick, perf_event_task_tick() would then unthrottle the event. In
> that scheme, the
> event would be throttled for at most a tick. But in fact, the event
> never generated that
> many overflows/tick to justify throttling.
>
> I think there is no other way than what I suggested in my initial email:
> 1- revert the nr_freq optimization
> 2- reset hwc->interrupt on all events at each tick
>
I think my original patch did that: https://lkml.org/lkml/2011/11/15/114
--
Gleb.
next prev parent reply other threads:[~2012-01-05 13:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-04 14:39 perf_events: proposed fix for broken intr throttling (repost) Stephane Eranian
2012-01-04 21:24 ` Peter Zijlstra
2012-01-04 21:33 ` Stephane Eranian
2012-01-04 22:49 ` Peter Zijlstra
2012-01-04 23:02 ` Stephane Eranian
2012-01-05 13:08 ` Stephane Eranian
2012-01-05 13:19 ` Gleb Natapov [this message]
2012-01-05 13:31 ` Stephane Eranian
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=20120105131908.GH31206@redhat.com \
--to=gleb@redhat.com \
--cc=asharma@fb.com \
--cc=eranian@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=vince@deater.net \
--cc=wcohen@redhat.com \
/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