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: <1437082414.12633.52.camel@tzanussi-mobl.amr.corp.intel.com>
Date:	Thu, 16 Jul 2015 16:33:34 -0500
From:	Tom Zanussi <tom.zanussi@...ux.intel.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	rostedt@...dmis.org, daniel.wagner@...-carit.de,
	masami.hiramatsu.pt@...achi.com, namhyung@...nel.org,
	josh@...htriplett.org, andi@...stfloor.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v9 07/22] tracing: Add lock-free tracing_map

On Thu, 2015-07-16 at 20:03 +0200, Peter Zijlstra wrote:
> On Thu, Jul 16, 2015 at 12:22:40PM -0500, Tom Zanussi wrote:
> > +	map->map = kcalloc(map->map_size, sizeof(struct tracing_map_entry),
> > +			   GFP_KERNEL);
> 
> In a later email you state the max map size to be 128k, with a 16 byte
> struct, that is 2m of memory for this allocation.
> 
> Isn't that a tad big for a kmalloc() ?

Yeah, that is a bit big for kmalloc (actually it's double that), though
I never ran into problems in my testing (of course that would depend on
the state of the system, and I mainly tested on a newly booted system).

It would probably make sense to make it page-based, which means a bit
more complicated mapping for the array (can't use vmalloc here) but that
shouldn't be too big a deal.

Tom

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