All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sched/fair: add __init to sched_init_granularity functions
@ 2020-04-06  7:47 Muchun Song
  2020-04-13 15:07 ` 宋牧春
  2020-05-01 18:22 ` [tip: sched/core] sched/fair: Mark sched_init_granularity __init tip-bot2 for Muchun Song
  0 siblings, 2 replies; 4+ messages in thread
From: Muchun Song @ 2020-04-06  7:47 UTC (permalink / raw)
  To: mingo, peterz; +Cc: linux-kernel, Muchun Song

Function sched_init_granularity() is only called from __init
functions, so mark it __init as well.

Signed-off-by: Muchun Song <songmuchun@bytedance.com>
---
 kernel/sched/fair.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 1141c7e77564d..6f05843c76d7d 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -191,7 +191,7 @@ static void update_sysctl(void)
 #undef SET_SYSCTL
 }
 
-void sched_init_granularity(void)
+void __init sched_init_granularity(void)
 {
 	update_sysctl();
 }
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] sched/fair: add __init to sched_init_granularity functions
  2020-04-06  7:47 [PATCH] sched/fair: add __init to sched_init_granularity functions Muchun Song
@ 2020-04-13 15:07 ` 宋牧春
  2020-04-13 15:44   ` Steven Rostedt
  2020-05-01 18:22 ` [tip: sched/core] sched/fair: Mark sched_init_granularity __init tip-bot2 for Muchun Song
  1 sibling, 1 reply; 4+ messages in thread
From: 宋牧春 @ 2020-04-13 15:07 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, Vincent Guittot, dietmar.eggemann,
	rostedt, Benjamin Segall, mgorman
  Cc: linux-kernel

On Mon, Apr 6, 2020 at 3:48 PM Muchun Song <songmuchun@bytedance.com> wrote:
>
> Function sched_init_granularity() is only called from __init
> functions, so mark it __init as well.
>
> Signed-off-by: Muchun Song <songmuchun@bytedance.com>
> ---
>  kernel/sched/fair.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 1141c7e77564d..6f05843c76d7d 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -191,7 +191,7 @@ static void update_sysctl(void)
>  #undef SET_SYSCTL
>  }
>
> -void sched_init_granularity(void)
> +void __init sched_init_granularity(void)
>  {
>         update_sysctl();
>  }
> --
> 2.11.0
>

Ping guys. Any suggestions?

-- 
Yours,
Muchun

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] sched/fair: add __init to sched_init_granularity functions
  2020-04-13 15:07 ` 宋牧春
@ 2020-04-13 15:44   ` Steven Rostedt
  0 siblings, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2020-04-13 15:44 UTC (permalink / raw)
  To: 宋牧春
  Cc: mingo, peterz, juri.lelli, Vincent Guittot, dietmar.eggemann,
	Benjamin Segall, mgorman, linux-kernel

On Mon, 13 Apr 2020 23:07:03 +0800
宋牧春 <songmuchun@bytedance.com> 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@goodmis.org>

-- Steve

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [tip: sched/core] sched/fair: Mark sched_init_granularity __init
  2020-04-06  7:47 [PATCH] sched/fair: add __init to sched_init_granularity functions Muchun Song
  2020-04-13 15:07 ` 宋牧春
@ 2020-05-01 18:22 ` tip-bot2 for Muchun Song
  1 sibling, 0 replies; 4+ messages in thread
From: tip-bot2 for Muchun Song @ 2020-05-01 18:22 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Muchun Song, Peter Zijlstra (Intel), Steven Rostedt (VMware), x86, LKML

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     f38f12d1e0811c0ee59260b2bdadedf99e16c4af
Gitweb:        https://git.kernel.org/tip/f38f12d1e0811c0ee59260b2bdadedf99e16c4af
Author:        Muchun Song <songmuchun@bytedance.com>
AuthorDate:    Mon, 06 Apr 2020 15:47:50 +08:00
Committer:     Peter Zijlstra <peterz@infradead.org>
CommitterDate: Thu, 30 Apr 2020 20:14:41 +02:00

sched/fair: Mark sched_init_granularity __init

Function sched_init_granularity() is only called from __init
functions, so mark it __init as well.

Signed-off-by: Muchun Song <songmuchun@bytedance.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Link: https://lkml.kernel.org/r/20200406074750.56533-1-songmuchun@bytedance.com
---
 kernel/sched/fair.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index fac5b2f..cd7fd7e 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -191,7 +191,7 @@ static void update_sysctl(void)
 #undef SET_SYSCTL
 }
 
-void sched_init_granularity(void)
+void __init sched_init_granularity(void)
 {
 	update_sysctl();
 }

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-05-01 18:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-06  7:47 [PATCH] sched/fair: add __init to sched_init_granularity functions Muchun Song
2020-04-13 15:07 ` 宋牧春
2020-04-13 15:44   ` Steven Rostedt
2020-05-01 18:22 ` [tip: sched/core] sched/fair: Mark sched_init_granularity __init tip-bot2 for Muchun Song

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.