Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1442530

[PATCH 5/5] time: Drop local_irq_save/restore from irqtime_account_irq

From Frederic Weisbecker <fweisbec@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 5/5] time: Drop local_irq_save/restore from irqtime_account_irq
Date 2016-07-13 17:00 +0200
Message-ID <rUtNM-4qs-39@gated-at.bofh.it> (permalink)
References <rUtNM-4qs-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Rik van Riel <riel@redhat.com>

Paolo pointed out that irqs are already blocked when irqtime_account_irq
is called. That means there is no reason to call local_irq_save/restore
again.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Rik van Riel <riel@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Wanpeng Li <wanpeng.li@hotmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Radim Krcmar <rkrcmar@redhat.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
---
 kernel/sched/cputime.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c
index 16a873c..ea0f6f3 100644
--- a/kernel/sched/cputime.c
+++ b/kernel/sched/cputime.c
@@ -49,15 +49,12 @@ DEFINE_PER_CPU(seqcount_t, irq_time_seq);
  */
 void irqtime_account_irq(struct task_struct *curr)
 {
-	unsigned long flags;
 	s64 delta;
 	int cpu;
 
 	if (!sched_clock_irqtime)
 		return;
 
-	local_irq_save(flags);
-
 	cpu = smp_processor_id();
 	delta = sched_clock_cpu(cpu) - __this_cpu_read(irq_start_time);
 	__this_cpu_add(irq_start_time, delta);
@@ -75,7 +72,6 @@ void irqtime_account_irq(struct task_struct *curr)
 		__this_cpu_add(cpu_softirq_time, delta);
 
 	irq_time_write_end();
-	local_irq_restore(flags);
 }
 EXPORT_SYMBOL_GPL(irqtime_account_irq);
 
-- 
2.7.0

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[GIT PULL] cputime fixes and cleanups Frederic Weisbecker <fweisbec@gmail.com> - 2016-07-13 17:00 +0200
  [PATCH 2/5] nohz,cputime: Replace VTIME_GEN irq time code with IRQ_TIME_ACCOUNTING code Frederic Weisbecker <fweisbec@gmail.com> - 2016-07-13 17:00 +0200
    [tip:timers/nohz] sched/cputime: Replace VTIME_GEN irq time code  with IRQ_TIME_ACCOUNTING code tip-bot for Rik van Riel <tipbot@zytor.com> - 2016-07-14 12:40 +0200
  [PATCH 4/5] sched: Reorganize vtime native irqtime accounting headers Frederic Weisbecker <fweisbec@gmail.com> - 2016-07-13 17:00 +0200
    [tip:timers/nohz] sched/cputime: Reorganize vtime native irqtime  accounting headers tip-bot for Frederic Weisbecker <tipbot@zytor.com> - 2016-07-14 12:40 +0200
  [PATCH 5/5] time: Drop local_irq_save/restore from irqtime_account_irq Frederic Weisbecker <fweisbec@gmail.com> - 2016-07-13 17:00 +0200
    [tip:timers/nohz] sched/cputime: Drop local_irq_save/restore from  irqtime_account_irq() tip-bot for Rik van Riel <tipbot@zytor.com> - 2016-07-14 12:40 +0200
  [PATCH 3/5] sched: Complete cleanup of old vtime gen irqtime accounting Frederic Weisbecker <fweisbec@gmail.com> - 2016-07-13 17:00 +0200
    [tip:timers/nohz] sched/cputime: Clean up the old vtime gen irqtime  accounting completely tip-bot for Frederic Weisbecker <tipbot@zytor.com> - 2016-07-14 12:40 +0200
  [PATCH 1/5] sched,time: Count actually elapsed irq & softirq time Frederic Weisbecker <fweisbec@gmail.com> - 2016-07-13 17:00 +0200
    [tip:timers/nohz] sched/cputime: Count actually elapsed irq &  softirq time tip-bot for Rik van Riel <tipbot@zytor.com> - 2016-07-14 12:40 +0200

csiph-web