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


Groups > linux.kernel > #1220264

Re: [PATCH 2/2] rcu: Fix up timeouts for forcing the quiescent state

From Petr Mladek <pmladek@suse.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] rcu: Fix up timeouts for forcing the quiescent state
Date 2015-09-07 17:30 +0200
Message-ID <q66wN-137-3@gated-at.bofh.it> (permalink)
References <q4Y8i-1MD-15@gated-at.bofh.it> <q4Y8k-1MD-29@gated-at.bofh.it> <q593I-lg-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri 2015-09-04 16:49:46, Paul E. McKenney wrote:
> On Fri, Sep 04, 2015 at 02:11:30PM +0200, Petr Mladek wrote:
> > The deadline to force the quiescent state (jiffies_force_qs) is currently
> > updated only when the previous timeout passed. But the timeout used for
> > wait_event() is always the entire original timeout. This is strange.
> 
> They tell me that kthreads aren't supposed to every catch signals,
> hence the WARN_ON() in the early-exit case stray-signal case.

Yup, I have investigated this recently. All signals are really blocked
for kthreads by default. There are few threads that use signals but
they explicitly enable it by allow_signal().


> In the case where we were awakened with an explicit force-quiescent-state
> request, we do the scan, and then wait the full time for the next scan.
> So the point of the delay is to space out the scans, not to fit a
> pre-determined schedule.
> 
> The reason we get awakened with an explicit force-quiescent-state
> request is that a given CPU just got inundated with RCU callbacks
> or that rcutorture wants to hammer this code path.
> 
> So I am not seeing this as anything in need of fixing.
> 
> Am I missing something subtle here?

There is the commit 88d6df612cc3c99f5 ("rcu: Prevent spurious-wakeup
DoS attack on rcu_gp_kthread()"). It suggests that the spurious
wakeups are possible.

I would consider this patch as a fix/clean up of this Dos attack fix.
Huh, I forgot to mention it in the commit message.

To be honest, I personally do not know how to trigger the spurious
wakeup in the current state of the code. I am trying to convert
the kthread into the kthread worker API and there I got the spurious
wakeups but this is another story.

Thanks a lot for reviewing.

Best Regards,
Petr
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


Thread

[PATCH 0/2] rcu: two small fixes for RCU kthreads Petr Mladek <pmladek@suse.com> - 2015-09-04 14:20 +0200
  [PATCH 1/2] rcu: Show the real fqs_state Petr Mladek <pmladek@suse.com> - 2015-09-04 14:20 +0200
    Re: [PATCH 1/2] rcu: Show the real fqs_state "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-09-05 01:30 +0200
      Re: [PATCH 1/2] rcu: Show the real fqs_state Petr Mladek <pmladek@suse.com> - 2015-09-07 17:00 +0200
        Re: [PATCH 1/2] rcu: Show the real fqs_state "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-09-08 22:00 +0200
          Re: [PATCH 1/2] rcu: Show the real fqs_state Petr Mladek <pmladek@suse.com> - 2015-09-09 15:00 +0200
            Re: [PATCH 1/2] rcu: Show the real fqs_state "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-09-09 21:20 +0200
  [PATCH 2/2] rcu: Fix up timeouts for forcing the quiescent state Petr Mladek <pmladek@suse.com> - 2015-09-04 14:20 +0200
    Re: [PATCH 2/2] rcu: Fix up timeouts for forcing the quiescent state "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-09-05 02:00 +0200
      Re: [PATCH 2/2] rcu: Fix up timeouts for forcing the quiescent state Petr Mladek <pmladek@suse.com> - 2015-09-07 17:30 +0200
        Re: [PATCH 2/2] rcu: Fix up timeouts for forcing the quiescent state "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-09-08 22:10 +0200

csiph-web