Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1707470
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3] perf/core: Avoid context switch overheads |
| Date | 2017-08-09 18:40 +0200 |
| Message-ID | <ucCbv-1mZ-3@gated-at.bofh.it> (permalink) |
| References | <ucn2N-7Ls-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Aug 09, 2017 at 08:29:21AM +0800, 石祤 wrote: > From: "leilei.lin" <leilei.lin@alibaba-inc.com> > > A performance issue caused by less strickly check in task > sched when these tasks were once attached by per-task perf_event. > > A task will alloc task->perf_event_ctxp[ctxn] when it was called > by perf_event_open, and task->perf_event_ctxp[ctxn] would not > ever be freed to NULL. > > __perf_event_task_sched_in() > if (task->perf_event_ctxp[ctxn]) // here is always true > perf_event_context_sched_in() // operate pmu > > 50% at most performance overhead was observed under some extreme > test case. Therefore, add a more strick check as to ctx->nr_events, > when ctx->nr_events == 0, it's no need to continue. > > Signed-off-by: leilei.lin <leilei.lin@alibaba-inc.com> Thanks!
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v3] perf/core: Avoid context switch overheads "石祤" <linxiulei@gmail.com> - 2017-08-09 02:30 +0200 Re: [PATCH v3] perf/core: Avoid context switch overheads Peter Zijlstra <peterz@infradead.org> - 2017-08-09 18:40 +0200 [tip:perf/core] perf/core: Reduce context switch overhead "tip-bot for leilei.lin" <tipbot@zytor.com> - 2017-08-10 14:10 +0200
csiph-web