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] [day] [month] [year] [list]
Date:	Mon, 2 Mar 2015 15:21:01 -0800
From:	Alexei Starovoitov <ast@...mgrid.com>
To:	Tom Zanussi <tom.zanussi@...ux.intel.com>
Cc:	Steven Rostedt <rostedt@...dmis.org>,
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	Namhyung Kim <namhyung@...nel.org>,
	Andi Kleen <andi@...stfloor.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 07/15] mm: Add ___GFP_NOTRACE

On Mon, Mar 2, 2015 at 2:04 PM, Tom Zanussi <tom.zanussi@...ux.intel.com> wrote:
> On Mon, 2015-03-02 at 11:29 -0800, Alexei Starovoitov wrote:
>> On Mon, Mar 2, 2015 at 10:54 AM, Tom Zanussi
>> <tom.zanussi@...ux.intel.com> wrote:
>> >> >
>> >> > The idea would be that instead of getting your individually kmalloc'ed
>> >> > elements on-demand from kmalloc while in the handler, you'd get them
>> >> > from a pool you've pre-allocated when you set up the table.  This could
>> >> > be from a list of individual entries you've already kmalloc'ed ahead of
>> >> > time, or from an array of n * sizeof(entry).
>> >>
>> >> would work, but kinda ugly, since we will pre-allocate a lot
>> >> and may not be using it at all.
>> >>
>> >
>> > That's true but you have a user-defined map limit anyway, which you can
>> > adjust to minimize wastage.  And allocating ahead of time also means you
>> > perturb the system less while actually tracing.
>>
>> nope. it's the other way around.
>> using kmalloc is faster and less overhead on the whole system
>> then grabbing cache-cold objects from special pool.
>
> Until you start causing GFP_ATOMIC failures for what you're tracing
> because your map has grabbed them all...

hmm, you mean kmalloc runs out of memory since we're
trying to trace on a system that exhausted all memory already?
so then pre-allocation before hand will help?
yep, that's good use case.
I'm not against pre-allocation feature for maps.
My point was that it's not necessary most of the time.
We can add a flag to map_create to pre-allocate. Easily.
Just needs to be controlled by user.
--
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