Re: [Patch 2/4] Basic reorder infrastructure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> This patch puts the infrastructure in place to allow for a reordering of
> functions based inside the vmlinux.

Can we make this general instead of x86_64 only?
Then we can use Kconfig to enable it for the architectures where we want it.


>
> Index: linux-reorder2/arch/x86_64/Makefile
> ===================================================================
> --- linux-reorder2.orig/arch/x86_64/Makefile
> +++ linux-reorder2/arch/x86_64/Makefile
> @@ -35,6 +35,7 @@ CFLAGS += -m64
>  CFLAGS += -mno-red-zone
>  CFLAGS += -mcmodel=kernel
>  CFLAGS += -pipe
> +CFLAGS += -ffunction-sections

This should go in top-level Makefile
> Index: linux-reorder2/arch/x86_64/kernel/functionlist
> ===================================================================
> --- /dev/null
> +++ linux-reorder2/arch/x86_64/kernel/functionlist

I would have used extension .lds - but no strong feeling for it.

> Index: linux-reorder2/arch/x86_64/kernel/vmlinux.lds.S
> ===================================================================
> --- linux-reorder2.orig/arch/x86_64/kernel/vmlinux.lds.S
> +++ linux-reorder2/arch/x86_64/kernel/vmlinux.lds.S
> @@ -20,7 +20,12 @@ SECTIONS
>    phys_startup_64 = startup_64 - LOAD_OFFSET;
>    _text = .;			/* Text and read-only data */
>    .text :  AT(ADDR(.text) - LOAD_OFFSET) {
> +	/* First the code that has to be first for bootstrapping */
>  	*(.bootstrap.text)
> +	/* Then all the functions that are "hot" in profiles, to group them
> +           onto the same hugetlb entry */
> +	#include "functionlist"
> +	/* Then the rest */

And this part to go into include/asm-generaic/vmlinux.lds.h

>  	*(.text)
>  	SCHED_TEXT
>  	LOCK_TEXT


   Sam

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux