Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753682AbbGSJ6b (ORCPT ); Sun, 19 Jul 2015 05:58:31 -0400 Received: from mail-lb0-f181.google.com ([209.85.217.181]:36762 "EHLO mail-lb0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753643AbbGSJ6a (ORCPT ); Sun, 19 Jul 2015 05:58:30 -0400 Date: Sun, 19 Jul 2015 11:58:18 +0200 From: Marcin =?utf-8?Q?=C5=9Alusarz?= To: David Rientjes Cc: "Paul E. McKenney" , Tejun Heo , LKML , linux-mm@kvack.org Subject: Re: cpu_hotplug vs oom_notify_list: possible circular locking dependency detected Message-ID: <20150719095818.GA7200@marcin-Inspiron-7720> References: <20150712105634.GA11708@marcin-Inspiron-7720> <20150714232943.GW3717@linux.vnet.ibm.com> <20150715222612.GP3717@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2116 Lines: 48 On Thu, Jul 16, 2015 at 02:01:56PM -0700, David Rientjes wrote: > On Wed, 15 Jul 2015, Paul E. McKenney wrote: > > > On Tue, Jul 14, 2015 at 04:48:24PM -0700, David Rientjes wrote: > > > On Tue, 14 Jul 2015, Paul E. McKenney wrote: > > > > > > > commit a1992f2f3b8e174d740a8f764d0d51344bed2eed > > > > Author: Paul E. McKenney > > > > Date: Tue Jul 14 16:24:14 2015 -0700 > > > > > > > > rcu: Don't disable CPU hotplug during OOM notifiers > > > > > > > > RCU's rcu_oom_notify() disables CPU hotplug in order to stabilize the > > > > list of online CPUs, which it traverses. However, this is completely > > > > pointless because smp_call_function_single() will quietly fail if invoked > > > > on an offline CPU. Because the count of requests is incremented in the > > > > rcu_oom_notify_cpu() function that is remotely invoked, everything works > > > > nicely even in the face of concurrent CPU-hotplug operations. > > > > > > > > Furthermore, in recent kernels, invoking get_online_cpus() from an OOM > > > > notifier can result in deadlock. This commit therefore removes the > > > > call to get_online_cpus() and put_online_cpus() from rcu_oom_notify(). > > > > > > > > Reported-by: Marcin Ślusarz > > > > Reported-by: David Rientjes > > > > Signed-off-by: Paul E. McKenney > > > > > > Acked-by: David Rientjes > > > > Thank you! > > > > Any news on whether or not it solves the problem? > > > > Marcin, is your lockdep violation reproducible? If so, does this patch > fix it? I finally found enough time today to test it. I can reproduce it without the above patch and can't with. So: Tested-by: Marcin Ślusarz Thanks, Marcin -- 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/