Re: [PATCH] better align percpu counter (Was Re: [tip:sched/core]sched: cpuacct: Use bigger percpu counter batch values for stats counters

From: KAMEZAWA Hiroyuki
Date: Thu Aug 20 2009 - 22:23:20 EST


On Thu, 20 Aug 2009 12:04:03 +0200
Ingo Molnar <mingo@xxxxxxx> wrote:
> * KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:
> > with your program
> > before patch.
> > cpuacct off : 414000-416000 ctsw per sec.
> > cpuacct on : 401000-404000 ctsw per sec.
> >
> > after patch
> > cpuacct on : 412000-413000 ctsw per sec.
> >
> > Maybe I should check cache-miss late ;)
>
> Btw., in latest upstream you can do that via:
>
> cd tools/perf/
> make -j install
>
> perf stat --repeat 5 -- taskset -c 1 ./context_switch
>

tried. (on 8cpu/2socket host). It seems cache-miss decreases.
But IPC ..?
==
/root/bin/perf stat --repeat 5 -a -e cycles,instructions,cache-misses,L1-dcache-load-misses,L1-dcache-store-misses -- ./ctxt_sw.sh
[Before] patch
Performance counter stats for './ctxt_sw.sh' (5 runs):

1511260148530 cycles ( +- 0.025% ) (scaled from 63.49% )
470690642181 instructions # 0.311 IPC ( +- 0.098% )(scaled from 79.49%)
1210051728 cache-misses ( +- 0.629% ) (scaled from 79.00% )
3202978828 L1-dcache-load-misses ( +- 1.118% ) (scaled from 78.00% )
1803963907 L1-dcache-store-misses ( +- 0.728% ) (scaled from 42.99% )

60.161941918 seconds time elapsed ( +- 0.029% )

[After] patch
Performance counter stats for './ctxt_sw.sh' (5 runs):

1511961867506 cycles ( +- 0.018% ) (scaled from 71.50%)
448724406149 instructions # 0.297 IPC ( +- 0.133% ) (scaled from 75.49%)
1184548041 cache-misses ( +- 0.136% ) (scaled from 75.50%)
3086357048 L1-dcache-load-misses ( +- 0.822% ) (scaled from 77.50%)
1708375493 L1-dcache-store-misses ( +- 0.328% ) (scaled from 47.00%)

60.179814774 seconds time elapsed ( +- 0.052% )

Thanks,
-Kame

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