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:	Mon, 28 May 2007 15:14:35 +0530
From:	"Satyam Sharma" <satyam.sharma@...il.com>
To:	"Nitin Gupta" <nitingupta910@...il.com>
Cc:	lkml <linux-kernel@...r.kernel.org>, linux-mm-cc@...top.org,
	linuxcompressed-devel@...ts.sourceforge.net,
	"Andrew Morton" <akpm@...ux-foundation.org>,
	"Richard Purdie" <richard@...nedhand.com>,
	"Daniel Hazelton" <dhazelton@...er.net>,
	"Bret Towe" <magnade@...il.com>
Subject: Re: [RFC] LZO de/compression support - take 5

On 5/28/07, Nitin Gupta <nitingupta910@...il.com> wrote:
> [...]
> Can anyone do timing measurement in kernel space only. This will
> eliminate all possible problems w.r.t usespace testing. I tried doing
> the same using get_jiffies_64() across calls to compressor in the
> 'compress-test' module but this is giving same value when measured
> just before and after calls to lzo1x_compress(). I don't know why.

Jiffies wouldn't really offer the kind of precision to serve your purpose.

> If anyone can simply measure time across lzo1x_compress() and
> lzo1x_decompress() calls in this compress-test module, then that will
> give us proper perf. figures.

I wish I had time for this myself (I'll see if I can do this tonight) ... but
anyhow, the idea is quite simply this:

cycles_t start, end;
unsigned long long diff;

start = get_cycles();
/*
 * lzo1x_compress() or
 * lzo1x_decompress() or whatever
 * on large enough input size.
 */
end = get_cycles();

diff = end - start;

That is all there is to it.

Note that get_cycles() (on x86 boxes, at least) might not be usable
or trustworthy on SMP machines unless you ensure that your code
(including the start and end timing measurements) executes on the
same particular CPU.

You could also use something like this when pin-pointing the exact
cause of the performance loss you experienced when the code was
fully cleaned up initially (before you started rolling back some stuff).

Satyam
-
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