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]
Message-Id: <20090507215258.6227128c.akpm@linux-foundation.org>
Date:	Thu, 7 May 2009 21:52:58 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH 3/4] ring-buffer: add total count in
 ring-buffer-benchmark

On Fri, 08 May 2009 00:32:53 -0400 Steven Rostedt <rostedt@...dmis.org> wrote:

> --- a/kernel/trace/ring_buffer_benchmark.c
> +++ b/kernel/trace/ring_buffer_benchmark.c
> @@ -285,6 +285,17 @@ static void ring_buffer_producer(void)
>  		avg = 1000000 / hit;
>  		pr_info("%ld ns per entry\n", avg);
>  	}
> +
> +

s/\n\n/\n/

> +	if (missed) {
> +		if (time)
> +			missed /= (long)time;
> +
> +		pr_info("Total iterations per millisec: %ld\n", hit + missed);
> +
> +		avg = 1000000 / (hit + missed);

s/1000000/USEC_PER_SEC/?

Hopefully we can't have hit+missed==0.

They're counters and hence should have unsigned types.

But even unsigned up-counters can add to zero if wrapping occurs.


> +		pr_info("%ld ns per entry\n", avg);
> +	}
>  }
--
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