lkml.org 
[lkml]   [2017]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 17/25] hrtimer: Implementation of softirq hrtimer handling
On Thu, Sep 28, 2017 at 09:59:50AM +0200, Thomas Gleixner wrote:
> On Wed, 27 Sep 2017, Peter Zijlstra wrote:
> > On Thu, Aug 31, 2017 at 12:23:42PM -0000, Anna-Maria Gleixner wrote:
> > static void __run_hrtimer(struct hrtimer_cpu_base *cpu_base,
> > struct hrtimer_clock_base *base,
> > struct hrtimer *timer, ktime_t *now,
> > - bool hardirq)
> > + unsigned long flags)
> > {
> > enum hrtimer_restart (*fn)(struct hrtimer *);
> > int restart;
> > @@ -1298,19 +1323,13 @@ static void __run_hrtimer(struct hrtimer
> > * protected against migration to a different CPU even if the lock
> > * is dropped.
> > */
> > - if (hardirq)
> > - raw_spin_unlock(&cpu_base->lock);
> > - else
> > - raw_spin_unlock_irq(&cpu_base->lock);
> > + raw_spin_unlock_irqrestore(&cpu_base->lock, flags);
> >
> > trace_hrtimer_expire_entry(timer, now);
> > restart = fn(timer);
> > trace_hrtimer_expire_exit(timer);
> >
> > - if (hardirq)
> > - raw_spin_lock(&cpu_base->lock);
> > - else
> > - raw_spin_lock_irq(&cpu_base->lock);
> > + raw_spin_lock_irqsave(&cpu_base->lock, flags);
>
> No point in irqsave() here. _irq() is sufficient as we leave the function
> right after that.

True, I wasn't entirely sure on the irq tracing assumptions (if any) and
was too lazy to double check.

\
 
 \ /
  Last update: 2017-09-28 10:15    [W:0.104 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site