lkml.org 
[lkml]   [2013]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86: Use asm-goto to implement mutex fast path on x86-64

* Borislav Petkov <bp@alien8.de> wrote:

> On Mon, Jul 01, 2013 at 01:11:22PM +0200, Ingo Molnar wrote:
> > Hm, a 6 seconds win looks _way_ too much - we don't execute that much
> > mutex code, let alone a portion of it.
> >
> > This could perhaps be a bootup-to-bootup cache layout systematic jitter
> > artifact, which isn't captured by stddev observations?
> >
> > Doing something like this with a relatively fresh version of perf:
> >
> > perf stat --repeat 10 -a --sync \
> > --pre 'make -s O=defconfig-build/ clean; echo 1 > /proc/sys/vm/drop_caches' \
> > make -s -j64 O=defconfig-build/ bzImage
> >
> > ... might do the trick (untested!). (Also note the use of -a: this should
> > run on an otherwise quiescent system.)
>
> Yep, I didn't run -a since I wanted to trace only the build process.
> Btw, the build-kernel.sh script looks like this:
>
> #!/bin/bash
>
> NUM_CPUS=$(cat /proc/cpuinfo | grep processor | wc -l)
> MAKE_OPTS=-j$(($NUM_CPUS+1))
>
> echo 3 > /proc/sys/vm/drop_caches
> make $MAKE_OPTS mrproper
> make $MAKE_OPTS oldconfig
> make $MAKE_OPTS
> <EOF>
>
> Let me try your perf tracing variant.
>
> > As a sidenote, we could add this as a convenience feature, triggered via:
> >
> > perf stat --flush-vm-caches
> >
> > ... or so, in addition to the already existing --sync option.
>
> Is this something which we want to use a lot? [...]

For cache-cold measurements I'm sure it's handy.

> [...] Also, there's 1, 2 and 3 as arg to drop_caches:
>
> drop_caches
>
> Writing to this will cause the kernel to drop clean caches, dentries and
> inodes from memory, causing that memory to become free.
>
> To free pagecache:
> echo 1 > /proc/sys/vm/drop_caches
> To free dentries and inodes:
> echo 2 > /proc/sys/vm/drop_caches
> To free pagecache, dentries and inodes:
> echo 3 > /proc/sys/vm/drop_caches

Yeah, so it would have to be a --vm-drop-caches <N> option I guess.

Thanks,

Ingo


\
 
 \ /
  Last update: 2013-07-01 15:41    [W:0.052 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site