mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC][PATCH] PERF_COUNT_SW_RUNNABLE_TASKS: measure and act upon parallellism
@ 2010-02-07 11:30 highguy
  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-08 10:00 ` [RFC][PATCH] PERF_COUNT_SW_RUNNABLE_TASKS: measure and act upon parallellism Peter Zijlstra
  0 siblings, 2 replies; 10+ messages in thread
From: highguy @ 2010-02-07 11:30 UTC (permalink / raw)
  To: mingo, linux-kernel
  Cc: torvalds, efault, a.p.zijlstra, andrea, tglx, akpm, peterz


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-02-08 12:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-07 11:30 [RFC][PATCH] PERF_COUNT_SW_RUNNABLE_TASKS: measure and act upon parallellism highguy
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

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