Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1352816 > unrolled thread
| Started by | James Morse <james.morse@arm.com> |
|---|---|
| First post | 2016-03-08 11:10 +0100 |
| Last post | 2016-03-08 12:30 +0100 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [RFC][PATCH 07/12] perf: Simplify/fix perf_event_enable() event scheduling James Morse <james.morse@arm.com> - 2016-03-08 11:10 +0100
Re: [RFC][PATCH 07/12] perf: Simplify/fix perf_event_enable() event scheduling Peter Zijlstra <peterz@infradead.org> - 2016-03-08 11:30 +0100
Re: [RFC][PATCH 07/12] perf: Simplify/fix perf_event_enable() event scheduling James Morse <james.morse@arm.com> - 2016-03-08 11:50 +0100
Re: [RFC][PATCH 07/12] perf: Simplify/fix perf_event_enable() event scheduling Peter Zijlstra <peterz@infradead.org> - 2016-03-08 12:30 +0100
| From | James Morse <james.morse@arm.com> |
|---|---|
| Date | 2016-03-08 11:10 +0100 |
| Subject | Re: [RFC][PATCH 07/12] perf: Simplify/fix perf_event_enable() event scheduling |
| Message-ID | <ramKv-7SB-23@gated-at.bofh.it> |
Hi Peter! On 11/01/16 16:25, Peter Zijlstra wrote: > Like enable_on_exec, perf_event_enable() event scheduling has problems > respecting the context hierarchy when trying to schedule events (for > example, it will try and add a pinned event without first removing > existing flexible events). > > So simplify it by using the new ctx_resched() call which will DTRT. > > Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> I'm seeing 'failures' for the ltp test perf_event_open02[0] with v4.5-rcs. git bisect points to this patch[1]. I suspect the test is over-reliant on the behaviour of the removed code. This has been seen on arm64 and x86_64[2]. Thanks, James [0] https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/syscalls/perf_event_open/perf_event_open02.c [1] Bisect log ---------------------------------------- git bisect start # good: [afd2ff9b7e1b367172f18ba7f693dfb62bdcb2dc] Linux 4.4 git bisect good afd2ff9b7e1b367172f18ba7f693dfb62bdcb2dc # bad: [18558cae0272f8fd9647e69d3fec1565a7949865] Linux 4.5-rc4 git bisect bad 18558cae0272f8fd9647e69d3fec1565a7949865 # good: [875fc4f5ddf35605581f9a5900c14afef48611f2] Merge branch 'akpm' (patches from Andrew) git bisect good 875fc4f5ddf35605581f9a5900c14afef48611f2 # good: [9f273c24ec5f4a6f785bb83e931b3808a07b459e] MAINTAINERS: add/fix git URLs for various subsystems git bisect good 9f273c24ec5f4a6f785bb83e931b3808a07b459e # good: [2c9b3ebd5913c2d1371b749a8057ac32972b410d] Merge tag 'mmc-v4.5-rc1' of git://git.linaro.org/people/ulf.hansson/mmc git bisect good 2c9b3ebd5913c2d1371b749a8057ac32972b410d # bad: [54e3f3e30245abb0d47e3bc53a1b3c75434616f1] Merge tag 'tty-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty git bisect bad 54e3f3e30245abb0d47e3bc53a1b3c75434616f1 # good: [e1c10879ed59436cde537b723545430b04d4dec0] Merge tag 'platform-drivers-x86-v4.5-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86 git bisect good e1c10879ed59436cde537b723545430b04d4dec0 # good: [f51d4d7826d64dee2c421267c7bd44c4d52805c5] Merge tag 'hwmon-for-linus-v4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging git bisect good f51d4d7826d64dee2c421267c7bd44c4d52805c5 # good: [bbfb239a106d41d793f58befdaf5c806e34ea97e] Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip git bisect good bbfb239a106d41d793f58befdaf5c806e34ea97e # bad: [7ab85d4a85160ea2ffc96b1255443cbc83be180f] Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip git bisect bad 7ab85d4a85160ea2ffc96b1255443cbc83be180f # bad: [45c815f06b80031659c63d7b93e580015d6024dd] perf: Synchronously free aux pages in case of allocation failure git bisect bad 45c815f06b80031659c63d7b93e580015d6024dd # good: [70a0165752944e0be0b1de4a9020473079962c18] perf: Fix cgroup scheduling in perf_enable_on_exec() git bisect good 70a0165752944e0be0b1de4a9020473079962c18 # bad: [63e30d3e52d4d85854ce6c761ffc6ab55209a630] perf: Make ctx->is_active and cpuctx->task_ctx consistent git bisect bad 63e30d3e52d4d85854ce6c761ffc6ab55209a630 # good: [8833d0e286c12fd4456089a7a553faf4921e4b08] perf: Use task_ctx_sched_out() git bisect good 8833d0e286c12fd4456089a7a553faf4921e4b08 # bad: [25432ae96a9889774a05bf5f0f6fd8dbcdec5e72] perf: Optimize perf_sched_events() usage git bisect bad 25432ae96a9889774a05bf5f0f6fd8dbcdec5e72 # bad: [aee7dbc45f8aa976913de9b352fa6da816f1f3cd] perf: Simplify/fix perf_event_enable() event scheduling git bisect bad aee7dbc45f8aa976913de9b352fa6da816f1f3cd # first bad commit: [aee7dbc45f8aa976913de9b352fa6da816f1f3cd] perf: Simplify/fix perf_event_enable() event scheduling ---------------------------------------- [2] ---------------------------------------- x86_64, v4.2 nanook@trouble-every-day:~$ ./perf_event_open02 -v at iteration:0 value:3001278671 time_enabled:378865967 time_running:378865967 at iteration:1 value:3001294516 time_enabled:379206798 time_running:379206798 at iteration:2 value:3001304264 time_enabled:379741658 time_running:379741658 at iteration:3 value:2247456463 time_enabled:381782350 time_running:285882994 perf_event_open02 0 TINFO : overall task clock: 382444297 perf_event_open02 0 TINFO : hw sum: 9004576323, task clock sum: 1146042829 hw counters: 1276985606 1284698955 1291658694 1294253771 1293189575 1285360592 1278429130 task clock counters: 162510606 163544930 164439727 164730880 164600624 163538072 162677990 perf_event_open02 0 TINFO : ratio: 3.00 perf_event_open02 1 TPASS : test passed ---------------------------------------- x86_64, v4.5-rc5: nanook@trouble-every-day:~$ ./perf_event_open02 -v at iteration:0 value:3001332678 time_enabled:379409484 time_running:379408991 perf_event_open02 0 TINFO : overall task clock: 381025905 perf_event_open02 0 TINFO : hw sum: 9004621962, task clock sum: 1142038427 hw counters: 2249100352 2254366204 2252915996 2248239410 task clock counters: 285302769 285853299 285787328 285095031 perf_event_open02 0 TINFO : ratio: 3.00 perf_event_open02 1 TFAIL : perf_event_open02.c:333: test failed (ratio was greater than ) ----------------------------------------
[toc] | [next] | [standalone]
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Date | 2016-03-08 11:30 +0100 |
| Message-ID | <ran3Q-80x-5@gated-at.bofh.it> |
| In reply to | #1352816 |
On Tue, Mar 08, 2016 at 10:04:17AM +0000, James Morse wrote: > [0] > https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/syscalls/perf_event_open/perf_event_open02.c I so hate LTP, you can't compile the test cases in isolate and running 'make' doesn't work. > [2] > ---------------------------------------- > x86_64, v4.2 > nanook@trouble-every-day:~$ ./perf_event_open02 -v > at iteration:0 value:3001278671 time_enabled:378865967 time_running:378865967 > at iteration:1 value:3001294516 time_enabled:379206798 time_running:379206798 > at iteration:2 value:3001304264 time_enabled:379741658 time_running:379741658 > at iteration:3 value:2247456463 time_enabled:381782350 time_running:285882994 > perf_event_open02 0 TINFO : overall task clock: 382444297 > perf_event_open02 0 TINFO : hw sum: 9004576323, task clock sum: 1146042829 > hw counters: 1276985606 1284698955 1291658694 1294253771 1293189575 1285360592 > 1278429130 > task clock counters: 162510606 163544930 164439727 164730880 164600624 163538072 > 162677990 > perf_event_open02 0 TINFO : ratio: 3.00 > perf_event_open02 1 TPASS : test passed > ---------------------------------------- > x86_64, v4.5-rc5: > nanook@trouble-every-day:~$ ./perf_event_open02 -v > at iteration:0 value:3001332678 time_enabled:379409484 time_running:379408991 > perf_event_open02 0 TINFO : overall task clock: 381025905 > perf_event_open02 0 TINFO : hw sum: 9004621962, task clock sum: 1142038427 > hw counters: 2249100352 2254366204 2252915996 2248239410 > task clock counters: 285302769 285853299 285787328 285095031 > perf_event_open02 0 TINFO : ratio: 3.00 > perf_event_open02 1 TFAIL : perf_event_open02.c:333: test failed (ratio > was greater than ) > ---------------------------------------- Its unfortunate the test doesn't actually tells what it was expecting. It fails to print 'nhw'. In any case, please try -rc6, which includes: a096309bc467 perf: Fix scaling vs. perf_install_in_context() bd2afa49d194 perf: Fix scaling vs. perf_event_enable() 7fce250915ef perf: Fix scaling vs. perf_event_enable_on_exec() 3cbaa5906967 perf: Fix ctx time tracking by introducing EVENT_TIME Which might fix this. I gave up after a few minutes trying to make LTP work.
[toc] | [prev] | [next] | [standalone]
| From | James Morse <james.morse@arm.com> |
|---|---|
| Date | 2016-03-08 11:50 +0100 |
| Message-ID | <rannc-87S-9@gated-at.bofh.it> |
| In reply to | #1352830 |
On 08/03/16 10:26, Peter Zijlstra wrote: > In any case, please try -rc6, which includes: Bother, I should have thought to test with the later rcs, I foolishly stopped with rc5. > a096309bc467 perf: Fix scaling vs. perf_install_in_context() > bd2afa49d194 perf: Fix scaling vs. perf_event_enable() > 7fce250915ef perf: Fix scaling vs. perf_event_enable_on_exec() > 3cbaa5906967 perf: Fix ctx time tracking by introducing EVENT_TIME > > Which might fix this. Yes, one of these has fixed the issue. For arm64 it no longer shows up with v4.5-rc6. Sorry for the noise! Thanks, James
[toc] | [prev] | [next] | [standalone]
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Date | 2016-03-08 12:30 +0100 |
| Message-ID | <ranZT-8V-5@gated-at.bofh.it> |
| In reply to | #1352869 |
On Tue, Mar 08, 2016 at 10:42:12AM +0000, James Morse wrote: > On 08/03/16 10:26, Peter Zijlstra wrote: > > In any case, please try -rc6, which includes: > > Bother, I should have thought to test with the later rcs, I foolishly stopped > with rc5. > > > a096309bc467 perf: Fix scaling vs. perf_install_in_context() > > bd2afa49d194 perf: Fix scaling vs. perf_event_enable() > > 7fce250915ef perf: Fix scaling vs. perf_event_enable_on_exec() > > 3cbaa5906967 perf: Fix ctx time tracking by introducing EVENT_TIME > > > > Which might fix this. > > Yes, one of these has fixed the issue. For arm64 it no longer shows up with > v4.5-rc6. Awesome, one less worry ;-) > Sorry for the noise! No problem.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web