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


Groups > linux.kernel > #1378820

Re: [RFC PATCH] sched/cputime: drop local_irq_safe() in vtime_init_idle()

From Rik van Riel <riel@redhat.com>
Newsgroups linux.kernel
Subject Re: [RFC PATCH] sched/cputime: drop local_irq_safe() in vtime_init_idle()
Date 2016-04-14 15:10 +0200
Message-ID <rnPbY-275-15@gated-at.bofh.it> (permalink)
References <rnOzh-1x1-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Thu, 2016-04-14 at 14:29 +0200, Sebastian Andrzej Siewior wrote:
> A while ago vtime_init_idle() used to invoke sched_clock_cpu() and
> had
> write_seqlock_irqsave() because sched_clock_cpu() required to be
> called
> with interrupts off.
> This requirement is written before the body of the function and was
> introduced in 2010 via c676329abb2b ("sched_clock: Add local_clock()
> API
> and improve documentation"). This requirement has been dropped in
> 2013
> via ef08f0fff876 ("sched/clock: Remove local_irq_disable() from the
> clocks")
> but the body of the function still has the comment.
> 
> Now, vtime_init_idle() was converted from seqlock to seqcount via
> b7ce2277f087 ("sched/cputime: Convert vtime_seqlock to seqcount") and
> while doing so the IRQ-off region around sched_clock_cpu() was
> preserved
> while not strictly required (given the first part of this commit).
> A little later, sched_clock_cpu() was replaced with jiffies via
> ff9a9b4c4334 ("sched, time: Switch VIRT_CPU_ACCOUNTING_GEN to jiffy
> granularity").
> Based on this events I assume it is safe to drop the local_irq_safe()
> section.
> 
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Rik van Riel <riel@redhat.com>
> Cc: Thomas Gleixner <tglx@linutronix.de
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> 

Acked-by: Rik van Riel <riel@redhat.com>

-- 
All Rights Reversed.

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


Thread

[RFC PATCH] sched/cputime: drop local_irq_safe() in vtime_init_idle() Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-04-14 14:30 +0200
  Re: [RFC PATCH] sched/cputime: drop local_irq_safe() in  vtime_init_idle() Rik van Riel <riel@redhat.com> - 2016-04-14 15:10 +0200
  Re: [RFC PATCH] sched/cputime: drop local_irq_safe() in  vtime_init_idle() Frederic Weisbecker <fweisbec@gmail.com> - 2016-04-14 15:20 +0200
    Re: [RFC PATCH] sched/cputime: drop local_irq_safe() in  vtime_init_idle() Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-04-14 15:50 +0200
      Re: [RFC PATCH] sched/cputime: drop local_irq_safe() in  vtime_init_idle() Frederic Weisbecker <fweisbec@gmail.com> - 2016-04-14 16:30 +0200

csiph-web