Re: [PATCH] sched/fair: add __init to sched_init_granularity functions

From: Steven Rostedt
Date: Mon Apr 13 2020 - 11:44:50 EST


On Mon, 13 Apr 2020 23:07:03 +0800
åçæ <songmuchun@xxxxxxxxxxxxx> wrote:

> > -void sched_init_granularity(void)
> > +void __init sched_init_granularity(void)
> > {
> > update_sysctl();
> > }
> > --
> > 2.11.0
> >
>
> Ping guys. Any suggestions?

Seems fine, but not that big of an issue as it's a very small function.

ffffffff81136880 <sched_init_granularity>:
ffffffff81136880: e8 7b b3 ac 00 callq ffffffff81c01c00 <__fentry__>
ffffffff81136881: R_X86_64_PLT32 __fentry__-0x4
ffffffff81136885: e9 86 86 ff ff jmpq ffffffff8112ef10 <update_sysctl>
ffffffff8113688a: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1)


But anyway, it can save 16 bytes of memory in the running kernel.

Reviewed-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>

-- Steve