Re: [PATCH] x86: Use asm-goto to implement mutex fast path on x86-64
From: Ingo Molnar
Date: Mon Jul 01 2013 - 08:50:55 EST
* Borislav Petkov <bp@xxxxxxxxx> 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
--
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/