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: <2093660141.63332.1461097049611.JavaMail.zimbra@efficios.com>
Date:	Tue, 19 Apr 2016 20:17:29 +0000 (UTC)
From:	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To:	rostedt <rostedt@...dmis.org>
Cc:	"H. Peter Anvin" <hpa@...or.com>, linux-kernel@...r.kernel.org,
	Ingo Molnar <mingo@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Jiri Olsa <jolsa@...nel.org>,
	Masami Hiramatsu <mhiramat@...nel.org>,
	Namhyung Kim <namhyung@...nel.org>,
	linux-trace-users@...r.kernel.org
Subject: Re: [RFC][PATCH 2/4] tracing: Use pid bitmap instead of a pid array
 for set_event_pid

----- On Apr 19, 2016, at 3:41 PM, rostedt rostedt@...dmis.org wrote:

> On Tue, 19 Apr 2016 11:57:32 -0700
> "H. Peter Anvin" <hpa@...or.com> wrote:
> 
>> Also, I understand there is one of these bitmaps per ring buffer, and
>> the ring buffer is in the tens of megabytes.
> 
> Right, there's only one bitmap per tracing instance, which in most
> cases is just one (I know of people who make more). And by default, the
> tracing buffer is 1.4 megs per CPU.
> 
> If you have a pid_max of the max size, I highly doubt you will be doing
> that on a single CPU machine. If you have 48 CPUs, the ring buffer will
> be 1.4 * 48 megs, making the 1/2 meg bitmap a nit.
> 
> I will say, there may be two bitmaps soon, because I plan on adding
> this same code to the function tracer logic.

Ah indeed, since there is a hard limit to 4194304, that makes the
worse case bitmap 512k.

We could argue that given a sparse dataset in the PID table (typical
in our use-cases), a small hash table would have better cache locality
than the bitmap. But I agree that the hash table does add a bit of
complexity, so it becomes a complexity vs cache locality tradeoff.
So I understand why you would want to go for the simpler bitmap
solution, unless the hash table would prove to bring a measurable
performance improvement.

Thanks,

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ