linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sched/cputime: remove irqtime_account_idle_ticks
@ 2020-01-16  3:17 Alex Shi
  2020-01-16  3:44 ` Alex Shi
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Shi @ 2020-01-16  3:17 UTC (permalink / raw)
  Cc: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
	Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
	linux-kernel

irqtime_account_idle_ticks just add longer call path w/o enough meaning.
We don't bother remove this function to simply code and reduce a
bit object size of kernel.

Signed-off-by: Alex Shi <alex.shi@linux.alibaba.com>
Cc: Ingo Molnar <mingo@redhat.com> 
Cc: Peter Zijlstra <peterz@infradead.org> 
Cc: Juri Lelli <juri.lelli@redhat.com> 
Cc: Vincent Guittot <vincent.guittot@linaro.org> 
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com> 
Cc: Steven Rostedt <rostedt@goodmis.org> 
Cc: Ben Segall <bsegall@google.com> 
Cc: Mel Gorman <mgorman@suse.de> 
Cc: linux-kernel@vger.kernel.org 
---
 kernel/sched/cputime.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c
index cff3e656566d..17640d145e44 100644
--- a/kernel/sched/cputime.c
+++ b/kernel/sched/cputime.c
@@ -390,12 +390,7 @@ static void irqtime_account_process_tick(struct task_struct *p, int user_tick,
 	}
 }
 
-static void irqtime_account_idle_ticks(int ticks)
-{
-	irqtime_account_process_tick(current, 0, ticks);
-}
 #else /* CONFIG_IRQ_TIME_ACCOUNTING */
-static inline void irqtime_account_idle_ticks(int ticks) { }
 static inline void irqtime_account_process_tick(struct task_struct *p, int user_tick,
 						int nr_ticks) { }
 #endif /* CONFIG_IRQ_TIME_ACCOUNTING */
@@ -505,7 +500,7 @@ void account_idle_ticks(unsigned long ticks)
 	u64 cputime, steal;
 
 	if (sched_clock_irqtime) {
-		irqtime_account_idle_ticks(ticks);
+		irqtime_account_process_tick(current, 0, ticks);
 		return;
 	}
 
-- 
1.8.3.1


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

* Re: [PATCH] sched/cputime: remove irqtime_account_idle_ticks
  2020-01-16  3:17 [PATCH] sched/cputime: remove irqtime_account_idle_ticks Alex Shi
@ 2020-01-16  3:44 ` Alex Shi
       [not found]   ` <20200118003207.GA4067@geo.homenetwork>
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Shi @ 2020-01-16  3:44 UTC (permalink / raw)
  Cc: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
	Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
	linux-kernel



在 2020/1/16 上午11:17, Alex Shi 写道:
> irqtime_account_idle_ticks just add longer call path w/o enough meaning.
> We don't bother remove this function to simply code and reduce a
> bit object size of kernel.

Sorry, above commit log need to revise as following:

irqtime_account_idle_ticks just add longer call path w/o enough meaning.
We'd better to remove this function to simply code and reduce a bit object
size of kernel.

> 
> Signed-off-by: Alex Shi <alex.shi@linux.alibaba.com>
> Cc: Ingo Molnar <mingo@redhat.com> 
> Cc: Peter Zijlstra <peterz@infradead.org> 
> Cc: Juri Lelli <juri.lelli@redhat.com> 
> Cc: Vincent Guittot <vincent.guittot@linaro.org> 
> Cc: Dietmar Eggemann <dietmar.eggemann@arm.com> 
> Cc: Steven Rostedt <rostedt@goodmis.org> 
> Cc: Ben Segall <bsegall@google.com> 
> Cc: Mel Gorman <mgorman@suse.de> 
> Cc: linux-kernel@vger.kernel.org 
> ---
>  kernel/sched/cputime.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c
> index cff3e656566d..17640d145e44 100644
> --- a/kernel/sched/cputime.c
> +++ b/kernel/sched/cputime.c
> @@ -390,12 +390,7 @@ static void irqtime_account_process_tick(struct task_struct *p, int user_tick,
>  	}
>  }
>  
> -static void irqtime_account_idle_ticks(int ticks)
> -{
> -	irqtime_account_process_tick(current, 0, ticks);
> -}
>  #else /* CONFIG_IRQ_TIME_ACCOUNTING */
> -static inline void irqtime_account_idle_ticks(int ticks) { }
>  static inline void irqtime_account_process_tick(struct task_struct *p, int user_tick,
>  						int nr_ticks) { }
>  #endif /* CONFIG_IRQ_TIME_ACCOUNTING */
> @@ -505,7 +500,7 @@ void account_idle_ticks(unsigned long ticks)
>  	u64 cputime, steal;
>  
>  	if (sched_clock_irqtime) {
> -		irqtime_account_idle_ticks(ticks);
> +		irqtime_account_process_tick(current, 0, ticks);
>  		return;
>  	}
>  
> 

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

* Re: [PATCH] sched/cputime: remove irqtime_account_idle_ticks
       [not found]     ` <a9c6fa27-e0e3-7559-949d-93fcc1c0a1bb@linux.alibaba.com>
@ 2020-01-18  3:09       ` Tao Zhou
  0 siblings, 0 replies; 3+ messages in thread
From: Tao Zhou @ 2020-01-18  3:09 UTC (permalink / raw)
  To: Alex Shi; +Cc: linux-kernel

On Sat, Jan 18, 2020 at 10:04:12AM +0800, Alex Shi wrote:
> 
> 
> 在 2020/1/18 上午8:32, Tao Zhou 写道:
> > On Thu, Jan 16, 2020 at 11:44:28AM +0800, Alex Shi wrote:
> >>
> >>
> >> 在 2020/1/16 上午11:17, Alex Shi 写道:
> >>> irqtime_account_idle_ticks just add longer call path w/o enough meaning.
> >>> We don't bother remove this function to simply code and reduce a
> >>> bit object size of kernel.
> >>
> >> Sorry, above commit log need to revise as following:
> >>
> >> irqtime_account_idle_ticks just add longer call path w/o enough meaning.
> >> We'd better to remove this function to simply code and reduce a bit object
> >> size of kernel.
> > 
> > Looks good and better to me.
> 
> Thanks! 
> 
> Why not reply to lkml openly? :)

Sorry, I want to.
The mail can not send if dest/cc include 'linux-kernel@vger.kernel.org'
No VPN from me. I will try another mail address. Any advice?


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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-16  3:17 [PATCH] sched/cputime: remove irqtime_account_idle_ticks Alex Shi
2020-01-16  3:44 ` Alex Shi
     [not found]   ` <20200118003207.GA4067@geo.homenetwork>
     [not found]     ` <a9c6fa27-e0e3-7559-949d-93fcc1c0a1bb@linux.alibaba.com>
2020-01-18  3:09       ` Tao Zhou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).