mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: riel@redhat.com, linux-kernel@vger.kernel.org
Cc: peterz@infradead.org, mingo@kernel.org, fweisbec@redhat.com,
	wanpeng.li@hotmail.com, efault@gmx.de, tglx@linutronix.de,
	rkrcmar@redhat.com
Subject: Re: [PATCH 3/3] time: drop local_irq_save/restore from irqtime_account_irq
Date: Mon, 11 Jul 2016 19:03:39 +0200	[thread overview]
Message-ID: <fe747bb3-03ff-2056-e088-f9499dfc76b8@redhat.com> (raw)
In-Reply-To: <1468256037-6307-4-git-send-email-riel@redhat.com>



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>

  reply	other threads:[~2016-07-11 17:03 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 ` [PATCH 3/3] time: drop local_irq_save/restore from irqtime_account_irq riel
2016-07-11 17:03   ` Paolo Bonzini [this message]
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=fe747bb3-03ff-2056-e088-f9499dfc76b8@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=efault@gmx.de \
    --cc=fweisbec@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=riel@redhat.com \
    --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

all inboxes | Powered by JetHome®