Re: [PATCH v2] sched: Micro optimization in pick_next_task() and in check_preempt_curr()
From: Steven Rostedt
Date: Thu Dec 19 2019 - 11:05:22 EST
On Thu, 19 Dec 2019 18:20:58 +0300
Kirill Tkhai <ktkhai@xxxxxxxxxxxxx> wrote:
> diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
> index e00f41aa8ec4..ff12a422ff19 100644
> --- a/include/asm-generic/vmlinux.lds.h
> +++ b/include/asm-generic/vmlinux.lds.h
> @@ -108,6 +108,13 @@
> #define SBSS_MAIN .sbss
> #endif
I would also add a comment here:
/*
* The order of the sched class addresses are important, as they are
* used to determine the order of the priority of each sched class in
* relation to each other.
*/
>
> +#define SCHED_DATA \
> + *(__idle_sched_class) \
> + *(__fair_sched_class) \
> + *(__rt_sched_class) \
> + *(__dl_sched_class) \
> + *(__stop_sched_class)
> +
> /*
> * Align to a 32 byte boundary equal to the
> * alignment gcc 4.5 uses for a struct
> @@ -308,6 +315,7 @@
> #define DATA_DATA \
> *(.xiptext) \
> *(DATA_MAIN) \
> + SCHED_DATA \
> *(.ref.data) \
> *(.data..shared_aligned) /* percpu related */ \
> MEM_KEEP(init.data*) \