[lkml]   [2018]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH RFC] doc: rcu: remove obsolete (non-)requirement about disabling preemption
On Thu, Oct 18, 2018 at 09:50:35PM -0400, Steven Rostedt wrote:
> On Thu, 18 Oct 2018 18:26:45 -0700
> Joel Fernandes <> wrote:
> > Yes, local_irq_restore is light weight, and does not check for reschedules.
> >
> > I was thinking of case where ksoftirqd is woken up, but does not run unless
> > we set the NEED_RESCHED flag. But that should get set anyway since probably
> > ksoftirqd is of high enough priority than the currently running task..
> >
> > Roughly speaking the scenario could be something like:
> >
> > rcu_read_lock();
> > <-- IPI comes in for the expedited GP, sets exp_hint
> > local_irq_disable();
> > // do a bunch of stuff
> > rcu_read_unlock(); <-- This calls the rcu_read_unlock_special which raises
> > the soft irq, and wakesup softirqd.
> If softirqd is of higher priority than the current running task, then
> the try_to_wake_up() will set NEED_RESCHED of the current task here.

Yes, only *if*. On my system, ksoftirqd is CFS nice 0. I thought expedited
grace periods are quite important and they should complete quickly which is
the whole reason for interrupting rcu read sections with an IPI and stuff.
IMO there should be no harm in setting NEED_RESCHED unconditionally anyway
for possible benefit of systems where the ksoftirqd is not of higher priority
than the currently running task, and we need to run it soon on the CPU. But
I'm Ok with whatever Paul and you want to do here.

- Joel

 \ /
  Last update: 2018-10-19 04:27    [W:0.062 / U:4.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site