Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1291782

Re: [PATCH/RFC 12/16] perf tools: Reduce lock contention when processing events

From Namhyung Kim <namhyung@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH/RFC 12/16] perf tools: Reduce lock contention when processing events
Date 2015-12-15 03:10 +0100
Message-ID <qFNdU-67l-15@gated-at.bofh.it> (permalink)
References <qE4iS-39l-7@gated-at.bofh.it> <qE4iT-39l-31@gated-at.bofh.it> <qFwZs-3HK-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Jiri,

On Mon, Dec 14, 2015 at 09:43:04AM +0100, Jiri Olsa wrote:
> On Thu, Dec 10, 2015 at 04:53:31PM +0900, Namhyung Kim wrote:
> > When multi-thread is enabled, the machine->threads_lock is contented
> > as all worker threads try to grab the writer lock using the
> > machine__findnew_thread().  Usually, the thread they're looking for is
> > in the tree so they only need the reader lock though.
> > 
> > Thus try machine__find_thread() first, and then fallback to the
> > 'findnew' API.  This will improve the performance.
> 
> found one other place, but I guess you chose those
> based on profiling the contention?

I only profiled my earlier perf report patchset and found
machine__findnew_thread() in perf_event__preprocess_sample() was
contended.  But perf-report serialized meta events and only process
sample events parallelly.

As perf-top processes all events parallelly, I thought I should use
the same technique for other places.

> 
> parent lookup in machine__process_fork_event

I'll add that too.

Thanks,
Namhyung
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH/RFC 12/16] perf tools: Reduce lock contention when  processing events Jiri Olsa <jolsa@redhat.com> - 2015-12-14 09:50 +0100
  Re: [PATCH/RFC 12/16] perf tools: Reduce lock contention when  processing events Namhyung Kim <namhyung@kernel.org> - 2015-12-15 03:10 +0100

csiph-web