Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1440776
| From | Paolo Bonzini <pbonzini@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/3] time: drop local_irq_save/restore from irqtime_account_irq |
| Date | 2016-07-11 19:10 +0200 |
| Message-ID | <rTMSt-1yI-13@gated-at.bofh.it> (permalink) |
| References | <rTMIN-1g9-3@gated-at.bofh.it> <rTMIO-1g9-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 11/07/2016 18:53, riel@redhat.com wrote:
> 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);
>
>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v4 0/3] sched,time: fix irq time accounting with nohz_idle riel@redhat.com - 2016-07-11 19:00 +0200
[PATCH 3/3] time: drop local_irq_save/restore from irqtime_account_irq riel@redhat.com - 2016-07-11 19:00 +0200
Re: [PATCH 3/3] time: drop local_irq_save/restore from irqtime_account_irq Paolo Bonzini <pbonzini@redhat.com> - 2016-07-11 19:10 +0200
Re: [PATCH v4 0/3] sched,time: fix irq time accounting with nohz_idle Frederic Weisbecker <fweisbec@gmail.com> - 2016-07-12 14:20 +0200
csiph-web