From: Andrew Morton <akpm@linux-foundation.org>
To: Ezequiel Garcia <elezegarcia@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Pekka Enberg <penberg@kernel.org>
Subject: Re: [PATCH 05/10] mm, util: Use dup_user to duplicate user memory
Date: Wed, 26 Sep 2012 14:42:19 -0700 [thread overview]
Message-ID: <20120926144219.bf4bfb9d.akpm@linux-foundation.org> (raw)
In-Reply-To: <CALF0-+WcXLR_akn8mL8u-QigHU9Bk5RotA3tbodZ8rhZsxpFLg@mail.gmail.com>
On Tue, 25 Sep 2012 22:15:38 -0300
Ezequiel Garcia <elezegarcia@gmail.com> wrote:
> > This patch increases util.o's text size by 238 bytes. A larger kernel
> > with a worsened cache footprint.
> >
> > And we did this to get marginally improved tracing output? This sounds
> > like a bad tradeoff to me.
> >
>
> Mmm, that's bad tradeoff indeed.
> It's certainly odd since the patch shouldn't increase the text size
> *that* much.
> Is it too much to ask that you send your kernel config and gcc version.
x86_64 allmodconfig with CONFIG_DEBUG_INFO=n,
CONFIG_ENABLE_MUST_CHECK=n. gcc-4.4.4.
> My compilation (x86 kernel in gcc 4.7.1) shows a kernel less bloated:
>
> $ readelf -s util-dup-user.o | grep dup_user
> 161: 00001c10 108 FUNC GLOBAL DEFAULT 1 memdup_user
> 169: 00001df0 159 FUNC GLOBAL DEFAULT 1 strndup_user
> $ readelf -s util.o | grep dup_user
> 161: 00001c10 108 FUNC GLOBAL DEFAULT 1 memdup_user
> 169: 00001df0 98 FUNC GLOBAL DEFAULT 1 strndup_user
>
> $ size util.o
> text data bss dec hex filename
> 18319 2077 0 20396 4fac util.o
> $ size util-dup-user.o
> text data bss dec hex filename
> 18367 2077 0 20444 4fdc util-dup-user.o
>
> Am I doing anything wrong?
Dunno - it could be a config thing.
> If you still feel this is unnecessary bloatness, perhaps I could think of
> something depending on CONFIG_TRACING (though I know
> we all hate those nasty ifdefs).
hm. Perhaps we could add an __always_inline_for_tracing. But that
wouldn't help a lot - a CONFIG_TRACING_SUPPORT=y kernel would still be
impacted even if the user is never using tracing.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@linux-foundation.org>
To: Ezequiel Garcia <elezegarcia@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Pekka Enberg <penberg@kernel.org>
Subject: Re: [PATCH 05/10] mm, util: Use dup_user to duplicate user memory
Date: Wed, 26 Sep 2012 14:42:19 -0700 [thread overview]
Message-ID: <20120926144219.bf4bfb9d.akpm@linux-foundation.org> (raw)
In-Reply-To: <CALF0-+WcXLR_akn8mL8u-QigHU9Bk5RotA3tbodZ8rhZsxpFLg@mail.gmail.com>
On Tue, 25 Sep 2012 22:15:38 -0300
Ezequiel Garcia <elezegarcia@gmail.com> wrote:
> > This patch increases util.o's text size by 238 bytes. A larger kernel
> > with a worsened cache footprint.
> >
> > And we did this to get marginally improved tracing output? This sounds
> > like a bad tradeoff to me.
> >
>
> Mmm, that's bad tradeoff indeed.
> It's certainly odd since the patch shouldn't increase the text size
> *that* much.
> Is it too much to ask that you send your kernel config and gcc version.
x86_64 allmodconfig with CONFIG_DEBUG_INFO=n,
CONFIG_ENABLE_MUST_CHECK=n. gcc-4.4.4.
> My compilation (x86 kernel in gcc 4.7.1) shows a kernel less bloated:
>
> $ readelf -s util-dup-user.o | grep dup_user
> 161: 00001c10 108 FUNC GLOBAL DEFAULT 1 memdup_user
> 169: 00001df0 159 FUNC GLOBAL DEFAULT 1 strndup_user
> $ readelf -s util.o | grep dup_user
> 161: 00001c10 108 FUNC GLOBAL DEFAULT 1 memdup_user
> 169: 00001df0 98 FUNC GLOBAL DEFAULT 1 strndup_user
>
> $ size util.o
> text data bss dec hex filename
> 18319 2077 0 20396 4fac util.o
> $ size util-dup-user.o
> text data bss dec hex filename
> 18367 2077 0 20444 4fdc util-dup-user.o
>
> Am I doing anything wrong?
Dunno - it could be a config thing.
> If you still feel this is unnecessary bloatness, perhaps I could think of
> something depending on CONFIG_TRACING (though I know
> we all hate those nasty ifdefs).
hm. Perhaps we could add an __always_inline_for_tracing. But that
wouldn't help a lot - a CONFIG_TRACING_SUPPORT=y kernel would still be
impacted even if the user is never using tracing.
next prev parent reply other threads:[~2012-09-26 21:42 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-08 20:47 [PATCH 01/10] Makefile: Add option CONFIG_DISABLE_GCC_AUTOMATIC_INLINING Ezequiel Garcia
2012-09-08 20:47 ` Ezequiel Garcia
2012-09-08 20:47 ` [PATCH 02/10] mm, slob: Use NUMA_NO_NODE instead of -1 Ezequiel Garcia
2012-09-08 20:47 ` Ezequiel Garcia
2012-09-09 21:27 ` David Rientjes
2012-09-09 21:27 ` David Rientjes
2012-09-24 17:13 ` Ezequiel Garcia
2012-09-24 17:13 ` Ezequiel Garcia
2012-09-25 7:37 ` Pekka Enberg
2012-09-25 7:37 ` Pekka Enberg
2012-09-25 10:13 ` Ezequiel Garcia
2012-09-25 10:13 ` Ezequiel Garcia
2012-09-08 20:47 ` [PATCH 03/10] mm, slab: Remove silly function slab_buffer_size() Ezequiel Garcia
2012-09-08 20:47 ` Ezequiel Garcia
2012-09-09 21:28 ` David Rientjes
2012-09-09 21:28 ` David Rientjes
2012-09-08 20:47 ` [PATCH 04/10] mm, slob: Add support for kmalloc_track_caller() Ezequiel Garcia
2012-09-08 20:47 ` Ezequiel Garcia
2012-09-25 19:53 ` [patch slab/next] mm, slob: fix build breakage in __kmalloc_node_track_caller David Rientjes
2012-09-25 19:53 ` David Rientjes
2012-09-25 19:55 ` Ezequiel Garcia
2012-09-25 19:55 ` Ezequiel Garcia
2012-09-08 20:47 ` [PATCH 05/10] mm, util: Use dup_user to duplicate user memory Ezequiel Garcia
2012-09-08 20:47 ` Ezequiel Garcia
2012-09-25 7:15 ` Pekka Enberg
2012-09-25 7:15 ` Pekka Enberg
2012-09-25 21:29 ` Andrew Morton
2012-09-25 21:29 ` Andrew Morton
2012-09-26 1:15 ` Ezequiel Garcia
2012-09-26 1:15 ` Ezequiel Garcia
2012-09-26 21:42 ` Andrew Morton [this message]
2012-09-26 21:42 ` Andrew Morton
2012-09-26 21:51 ` Ezequiel Garcia
2012-09-26 21:51 ` Ezequiel Garcia
2012-09-08 20:47 ` [PATCH 06/10] mm, slab: Replace 'caller' type, void* -> unsigned long Ezequiel Garcia
2012-09-08 20:47 ` Ezequiel Garcia
2012-09-08 20:47 ` [PATCH 07/10] mm, slab: Match SLAB and SLUB kmem_cache_alloc_xxx_trace() prototype Ezequiel Garcia
2012-09-08 20:47 ` Ezequiel Garcia
2012-09-08 20:47 ` [PATCH 08/10] mm, slab: Rename __cache_alloc() -> slab_alloc() Ezequiel Garcia
2012-09-08 20:47 ` Ezequiel Garcia
2012-09-08 20:47 ` [PATCH 09/10] mm, slub: Rename slab_alloc() -> slab_alloc_node() to match SLAB Ezequiel Garcia
2012-09-08 20:47 ` Ezequiel Garcia
2012-09-08 20:47 ` [PATCH 10/10] mm: Factor SLAB and SLUB common code Ezequiel Garcia
2012-09-08 20:47 ` Ezequiel Garcia
2012-09-08 21:43 ` [PATCH 01/10] Makefile: Add option CONFIG_DISABLE_GCC_AUTOMATIC_INLINING Sam Ravnborg
2012-09-08 21:43 ` Sam Ravnborg
2012-09-09 21:25 ` David Rientjes
2012-09-09 21:25 ` David Rientjes
2012-09-13 0:30 ` Ezequiel Garcia
2012-09-13 0:30 ` Ezequiel Garcia
2012-09-13 7:17 ` Michal Marek
2012-09-13 7:17 ` Michal Marek
2012-09-13 9:16 ` Ezequiel Garcia
2012-09-13 9:16 ` Ezequiel Garcia
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120926144219.bf4bfb9d.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=elezegarcia@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.