All of lore.kernel.org
 help / color / mirror / Atom feed
From: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
To: "He, Bo" <bo.he@intel.com>
Cc: "Zhang, Jun" <jun.zhang@intel.com>,
	"Bai, Jie A" <jie.a.bai@intel.com>,
	"Xiao, Jin" <jin.xiao@intel.com>,
	"paulmck@linux.ibm.com" <paulmck@linux.ibm.com>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: FAILED: patch "[PATCH] rcu: Do RCU GP kthread self-wakeup from softirq and interrupt" failed to apply to 4.19-stable tree
Date: Thu, 21 Mar 2019 17:46:02 +0100	[thread overview]
Message-ID: <20190321164602.GC11121@kroah.com> (raw)
In-Reply-To: <CD6925E8781EFD4D8E11882D20FC406D52A6405C@SHSMSX104.ccr.corp.intel.com>

On Thu, Mar 21, 2019 at 03:31:28PM +0000, He, Bo wrote:
> The rcu_gp_kthread_wake() function is invoked when it might be necessary
> to wake the RCU grace-period kthread.  Because self-wakeups are normally
> a useless waste of CPU cycles, if rcu_gp_kthread_wake() is invoked from
> this kthread, it naturally refuses to do the wakeup.
> 
> Unfortunately, natural though it might be, this heuristic fails when
> rcu_gp_kthread_wake() is invoked from an interrupt or softirq handler
> that interrupted the grace-period kthread just after the final check of
> the wait-event condition but just before the schedule() call.  In this
> case, a wakeup is required, even though the call to rcu_gp_kthread_wake()
> is within the RCU grace-period kthread's context.  Failing to provide
> this wakeup can result in grace periods failing to start, which in turn
> results in out-of-memory conditions.
> 
> This race window is quite narrow, but it actually did happen during real
> testing.  It would of course need to be fixed even if it was strictly
> theoretical in nature.
> 
> [ backport for 4.19 commit 1d1f898df6586c5ea9aeaf349f13089c6fa37903
> upstream. ]

Thanks for all of these, now queued up.

greg k-h

      reply	other threads:[~2019-03-21 16:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-20 17:43 FAILED: patch "[PATCH] rcu: Do RCU GP kthread self-wakeup from softirq and interrupt" failed to apply to 4.19-stable tree gregkh
2019-03-21 15:31 ` He, Bo
2019-03-21 16:46   ` gregkh [this message]

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=20190321164602.GC11121@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=bo.he@intel.com \
    --cc=jie.a.bai@intel.com \
    --cc=jin.xiao@intel.com \
    --cc=jun.zhang@intel.com \
    --cc=paulmck@linux.ibm.com \
    --cc=stable@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.