From: highguy@gmail.com
To: mingo@elte.hu, linux-kernel@vger.kernel.org
Cc: torvalds@linux-foundation.org, efault@gmx.de,
a.p.zijlstra@chello.nl, andrea@suse.de, tglx@linutronix.de,
akpm@linux-foundation.org, peterz@infradead.org
Subject: [RFC][PATCH] PERF_COUNT_SW_RUNNABLE_TASKS: measure and act upon parallellism
Date: Sun, 7 Feb 2010 12:30:53 +0100 [thread overview]
Message-ID: <1265542259-5596-1-git-send-email-HIGHGuY@gmail.com> (raw)
Hi all,
Here's an initial RFC patch for the parallallism
events for perf_events.
It works with a low number of tasks, but runs into a
couple of issues:
- something goes wrong when a thread exits. Apparently
the count is decremented twice. I'm still figuring this
one out, perhaps sync_stat is to blame.
This causes things to break with more than 3 threads if
I recall correctly.
- the count is stored with the parent event only. This means
the child list lock is not taken too often.
- adding threshold support to poll() breaks use with mmap.
poll() returns when count < threshold although no new
entries might be added to the memory map.
- min threshold is actually useless so it should be dropped.
There's definately more wrong with this early patchset
and I'm doubting whether perf_events is actually fit for
this purpose.
Currently, by design, it's not meant to support counters
that may also decrement. Also, the foreseen use of poll
to block execution of the thread doesn't seem to work
together well with the mmap()-use.
Some hints, pointers and remarks are definately welcome
at this stage.
Regards,
Stijn
next reply other threads:[~2010-02-07 11:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-07 11:30 highguy [this message]
2010-02-07 11:30 ` [PATCH 1/6] Move poll into perf_event and allow for wakeups when fd has not been mmap'd. This is useful when using read() to read out the current counter value highguy
2010-02-07 11:30 ` [PATCH 2/6] Allow min/max thresholds for wakeups highguy
2010-02-07 11:30 ` [PATCH 3/6] Add handlers for adding counter events, reading counter events, counter resets, wakeups. Renamed old read handler to update highguy
2010-02-07 11:30 ` [PATCH 4/6] Fix HW breakpoint handlers highguy
2010-02-07 11:30 ` [PATCH 5/6] Allow decrementing counters highguy
2010-02-07 11:30 ` [PATCH 6/6] Add PERF_COUNT_SW_RUNNABLE_TASKS highguy
2010-02-08 10:00 ` [RFC][PATCH] PERF_COUNT_SW_RUNNABLE_TASKS: measure and act upon parallellism Peter Zijlstra
2010-02-08 11:52 ` Stijn Devriendt
2010-02-08 11:59 ` 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=1265542259-5596-1-git-send-email-HIGHGuY@gmail.com \
--to=highguy@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=andrea@suse.de \
--cc=efault@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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
Powered by JetHome