lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 30 Oct 2010 21:23:57 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Hitoshi Mitake <mitake@....info.waseda.ac.jp>
Cc:	linux-kernel@...r.kernel.org, h.mitake@...il.com,
	"Ma Ling:" <ling.ma@...el.com>, Zhao Yakui <yakui.zhao@...el.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Paul Mackerras <paulus@...ba.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH 2/2] perf bench: add x86-64 specific benchmarks to perf
 bench mem memcpy


* Hitoshi Mitake <mitake@....info.waseda.ac.jp> wrote:

> This patch adds new file: mem-memcpy-x86-64-asm.S
> for x86-64 specific memcpy() benchmarking.
> Added new benchmarks are,
>  x86-64-rep:      memcpy() implemented with rep instruction
>  x86-64-unrolled: unrolled memcpy()
> 
> Original idea of including the source files of kernel
> for benchmarking is suggested by Ingo Molnar.
> This is more effective than write-once programs for quantitative
> evaluation of in-kernel, little and leaf functions called high frequently.
> Because perf bench is in kernel source tree and executing it
> on various hardwares, especially new model CPUs, is easy.
> 
> This way can also be used for other functions of kernel e.g. checksum functions.
> 
> Example of usage on Core i3 M330:
> 
> | % ./perf bench mem memcpy -l 500MB
> | # Running mem/memcpy benchmark...
> | # Copying 500MB Bytes from 0x7f911f94c010 to 0x7f913ed4d010 ...
> |
> |      578.732506 MB/Sec
> | % ./perf bench mem memcpy -l 500MB -r x86-64-rep
> | # Running mem/memcpy benchmark...
> | # Copying 500MB Bytes from 0x7fb4b6fe4010 to 0x7fb4d63e5010 ...
> |
> |      738.184980 MB/Sec
> | % ./perf bench mem memcpy -l 500MB -r x86-64-unrolled
> | # Running mem/memcpy benchmark...
> | # Copying 500MB Bytes from 0x7f6f2e668010 to 0x7f6f4da69010 ...
> |
> |      767.483269 MB/Sec
> 
> This shows clearly that unrolled memcpy() is efficient
> than rep version and glibc's one :)

Hey, really cool output :-)

Might also make sense to measure Ma Ling's patched version?

> # checkpatch.pl warns about two externs in bench/mem-memcpy.c
> # added by this patch. But I think it is no problem.

You should put these:

 +#ifdef ARCH_X86_64
 +extern void *memcpy_x86_64_unrolled(void *to, const void *from, size_t len);
 +extern void *memcpy_x86_64_rep(void *to, const void *from, size_t len);
 +#endif

into a .h file - a new one if needed.

That will make both checkpatch and me happier ;-)

Thanks,

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ