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]
Message-ID: <4CC71345.9050907@kernel.org>
Date:	Tue, 26 Oct 2010 20:43:33 +0300
From:	Pekka Enberg <penberg@...nel.org>
To:	Richard Kennedy <richard@....demon.co.uk>
CC:	Christoph Lameter <cl@...ux-foundation.org>,
	lkml <linux-kernel@...r.kernel.org>,
	linux-mm <linux-mm@...ck.org>,
	Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [PATCH] [v2] slub tracing: move trace calls out of always inlined
 functions to reduce kernel code size

On 21.10.2010 12.29, Richard Kennedy wrote:
> Having the trace calls defined in the always inlined kmalloc functions
> in include/linux/slub_def.h causes a lot of code duplication as the
> trace functions get instantiated for each kamalloc call site. This can
> simply be removed by pushing the trace calls down into the functions in
> slub.c.
>
> On my x86_64 built this patch shrinks the code size of the kernel by
> approx 36K and also shrinks the code size of many modules -- too many to
> list here ;)
>
> size vmlinux (2.6.36) reports
>         text        data     bss     dec     hex filename
>      5410611	 743172	 828928	6982711	 6a8c37	vmlinux
>      5373738	 744244	 828928	6946910	 6a005e	vmlinux + patch
>
> The resulting kernel has had some testing&  kmalloc trace still seems to
> work.
>
> This patch
> - moves trace_kmalloc out of the inlined kmalloc() and pushes it down
> into kmem_cache_alloc_trace() so this it only get instantiated once.
>
> - rename kmem_cache_alloc_notrace()  to kmem_cache_alloc_trace() to
> indicate that now is does have tracing. (maybe this would better being
> called something like kmalloc_kmem_cache ?)
>
> - adds a new function kmalloc_order() to handle allocation and tracing
> of large allocations of page order.
>
> - removes tracing from the inlined kmalloc_large() replacing them with a
> call to kmalloc_order();
>
> - move tracing out of inlined kmalloc_node() and pushing it down into
> kmem_cache_alloc_node_trace
>
> - rename kmem_cache_alloc_node_notrace() to
> kmem_cache_alloc_node_trace()
>
> - removes the include of trace/events/kmem.h from slub_def.h.
>
> v2
> - keep kmalloc_order_trace inline when !CONFIG_TRACE
>
> Signed-off-by: Richard Kennedy<richard@....demon.co.uk>

Applied, thanks!
--
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