From: riel@redhat.com
To: linux-kernel@vger.kernel.org
Cc: peterz@infradead.org, mingo@kernel.org, pbonzini@redhat.com,
fweisbec@redhat.com, wanpeng.li@hotmail.com, efault@gmx.de,
tglx@linutronix.de, rkrcmar@redhat.com
Subject: [PATCH 3/3] time: drop local_irq_save/restore from irqtime_account_irq
Date: Mon, 11 Jul 2016 12:53:57 -0400 [thread overview]
Message-ID: <1468256037-6307-4-git-send-email-riel@redhat.com> (raw)
In-Reply-To: <1468256037-6307-1-git-send-email-riel@redhat.com>
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.
Signed-off-by: Rik van Riel <riel@redhat.com>
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
---
kernel/sched/cputime.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c
index ca7e33cb0967..7b6fa4d7ad4c 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.4
next prev parent reply other threads:[~2016-07-11 16:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-11 16:53 [PATCH v4 0/3] sched,time: fix irq time accounting with nohz_idle riel
2016-07-11 16:53 ` [PATCH 1/3] sched,time: count actually elapsed irq & softirq time riel
2016-07-11 16:53 ` [PATCH 2/3] nohz,cputime: replace VTIME_GEN irq time code with IRQ_TIME_ACCOUNTING code riel
2016-07-11 16:53 ` riel [this message]
2016-07-11 17:03 ` [PATCH 3/3] time: drop local_irq_save/restore from irqtime_account_irq Paolo Bonzini
2016-07-12 12:10 ` [PATCH v4 0/3] sched,time: fix irq time accounting with nohz_idle Frederic Weisbecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1468256037-6307-4-git-send-email-riel@redhat.com \
--to=riel@redhat.com \
--cc=efault@gmx.de \
--cc=fweisbec@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=rkrcmar@redhat.com \
--cc=tglx@linutronix.de \
--cc=wanpeng.li@hotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox