John Reiser
4b3b4c5e64
ftrace: __start_mcount_loc should be .init.rodata
...
__start_mcount_loc[] is unused after init, yet occupies RAM forever
as part of .rodata. 152kiB is typical on a 64-bit architecture. Instead,
__start_mcount_loc should be in the interval [__init_begin, __init_end)
so that the space is reclaimed after init.
__start_mcount_loc[] is generated during the load portion
of kernel build, and is used only by ftrace_init(). ftrace_init is declared
'__init' and is in .init.text, which is freed after init.
__start_mcount_loc is placed into .rodata by a call to MCOUNT_REC inside
the RO_DATA macro of include/asm-generic/vmlinux.lds.h. The array *is*
read-only, but more importantly it is not used after init. So the call to
MCOUNT_REC should be moved from RO_DATA to INIT_DATA.
This patch has been tested on x86_64 with CONFIG_DEBUG_PAGEALLOC=y
which verifies that the address range never is accessed after init.
Signed-off-by: John Reiser <jreiser@BitWagon.com >
LKML-Reference: <4A6DF0B6.7080402@bitwagon.com >
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
2009-09-12 21:57:29 -04:00
..
2009-06-11 21:02:17 +02:00
2009-07-27 12:10:38 -07:00
2009-06-15 13:27:38 +10:00
2009-06-12 11:32:58 +02:00
2009-06-11 21:02:49 +02:00
2006-09-22 17:48:56 -07:00
2006-09-22 17:48:56 -07:00
2006-09-11 13:32:27 -04:00
2007-05-11 05:38:25 -04:00
2008-12-09 02:27:39 -05:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:31 +02:00
2009-06-11 21:02:14 +02:00
2009-05-06 16:36:09 -07:00
2009-06-11 21:02:37 +02:00
2009-06-11 21:02:50 +02:00
2009-06-11 21:02:50 +02:00
2009-06-11 21:02:51 +02:00
2008-02-07 08:42:30 -08:00
2008-02-07 08:42:30 -08:00
2008-02-06 10:41:00 -08:00
2009-06-11 21:02:37 +02:00
2009-06-11 21:02:37 +02:00
2006-12-01 14:52:01 -08:00
2008-05-01 08:03:58 -07:00
2008-06-30 12:51:05 +02:00
2008-07-26 12:00:03 -07:00
2009-06-18 13:03:58 -07:00
2009-06-11 21:02:42 +02:00
2005-07-26 14:35:41 -07:00
2005-04-16 15:20:36 -07:00
2009-06-03 14:06:14 -04:00
2009-06-11 21:02:37 +02:00
2009-03-26 18:14:14 +01:00
2008-04-30 08:29:54 -07:00
2009-06-11 21:02:17 +02:00
2009-04-02 19:04:51 -07:00
2009-06-19 14:58:09 +02:00
2009-06-11 21:02:42 +02:00
2005-04-16 15:20:36 -07:00
2009-06-11 21:02:14 +02:00
2009-06-11 21:02:14 +02:00
2009-06-11 21:02:49 +02:00
2008-08-12 16:07:31 -07:00
2009-06-11 21:02:15 +02:00
2008-04-24 23:40:47 +02:00
2009-06-11 21:02:15 +02:00
2006-10-05 15:10:12 +01:00
2009-06-11 21:02:37 +02:00
2009-06-11 21:02:37 +02:00
2009-06-11 21:02:16 +02:00
2009-06-11 21:02:14 +02:00
2008-10-27 11:39:03 +01:00
2009-06-17 13:06:17 +02:00
2007-10-12 14:55:37 -04:00
2009-06-11 21:02:37 +02:00
2009-05-18 08:34:08 -07:00
2009-01-06 15:59:10 -08:00
2007-05-02 19:27:14 +02:00
2009-06-11 21:01:52 +02:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:50 +02:00
2009-06-11 21:02:50 +02:00
2009-06-11 21:02:37 +02:00
2009-06-11 21:02:15 +02:00
2008-10-23 09:18:20 -07:00
2006-10-03 23:01:26 +02:00
2008-10-23 09:18:20 -07:00
2009-06-11 21:02:37 +02:00
2009-06-11 21:02:50 +02:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:42 +02:00
2008-07-26 12:00:03 -07:00
2009-06-17 14:04:42 -07:00
2009-06-30 18:55:59 -07:00
2009-06-11 21:02:50 +02:00
2009-07-27 12:10:38 -07:00
2009-07-27 12:10:38 -07:00
2009-06-23 14:34:30 +02:00
2007-05-11 08:29:34 -07:00
2009-06-11 21:02:15 +02:00
2008-01-25 21:08:27 +01:00
2009-06-11 21:02:18 +02:00
2009-06-11 21:02:37 +02:00
2009-06-18 13:03:57 -07:00
2009-06-11 21:02:50 +02:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:42 +02:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:15 +02:00
2009-04-13 15:04:30 -07:00
2009-06-11 21:01:52 +02:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:37 +02:00
2009-06-11 21:02:15 +02:00
2009-03-26 18:14:21 +01:00
2009-06-11 21:02:37 +02:00
2009-06-11 21:02:15 +02:00
2008-09-05 14:39:38 -07:00
2009-06-11 21:02:37 +02:00
2009-06-11 21:02:37 +02:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:01:52 +02:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:42 +02:00
2009-07-27 12:10:38 -07:00
2009-06-11 21:02:50 +02:00
2009-03-30 22:05:17 +10:30
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:17 +02:00
2009-06-19 14:58:08 +02:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:37 +02:00
2009-06-19 14:58:11 +02:00
2009-06-11 21:02:37 +02:00
2009-06-11 21:02:42 +02:00
2009-09-12 21:57:29 -04:00
2005-04-16 15:20:36 -07:00