From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35485C43381 for ; Thu, 21 Mar 2019 16:46:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 03B3F21902 for ; Thu, 21 Mar 2019 16:46:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553186766; bh=kIQnV+p6tLjq8nacHmEUarGDtMZTo/EQvKz6MHaD7ms=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=sTvANpDN0Ibp+2+G0iG2DnkeDAzvHqjdYzZNNUJDdt4IVHGpmwK4aHKCGWWDQfhjW MU9NN4W9uY5S/mJYnFvuRH32rmOa1r8zyB9lFDze4Lwc+ESFboWn2tyChnlgcTXGRR 8fC70UQhwwYYHcPm+uadEdZ4FGJgJvRdJhXT9PEY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725985AbfCUQqF (ORCPT ); Thu, 21 Mar 2019 12:46:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:34480 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728078AbfCUQqF (ORCPT ); Thu, 21 Mar 2019 12:46:05 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 270062183E; Thu, 21 Mar 2019 16:46:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553186764; bh=kIQnV+p6tLjq8nacHmEUarGDtMZTo/EQvKz6MHaD7ms=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hSDTEAftet4YJHG1peUr0MXCPfFpB26MezIMzUxwybR7dYoEUQKncTSKjLTMP0Pio O3lQoeugXg3uAWD3XFbMEsxFacS1ZNyqrlegOq4yghzZOzBQbBn+5j/nBClBD8peD0 80gNzWtHymfkB/Lh7nOz1Bodf/o8Mt3tI9XQuWJc= Date: Thu, 21 Mar 2019 17:46:02 +0100 From: "gregkh@linuxfoundation.org" To: "He, Bo" Cc: "Zhang, Jun" , "Bai, Jie A" , "Xiao, Jin" , "paulmck@linux.ibm.com" , "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 Message-ID: <20190321164602.GC11121@kroah.com> References: <1553103783214213@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 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