Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932484AbbGHLnm (ORCPT ); Wed, 8 Jul 2015 07:43:42 -0400 Received: from ipmail06.adl6.internode.on.net ([150.101.137.145]:29918 "EHLO ipmail06.adl6.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754251AbbGHLnk (ORCPT ); Wed, 8 Jul 2015 07:43:40 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2DJDACZDJ1VXWZJAg5cFoJ8VGC/Q4V3AoFSTQEBAQEBAQdEQEEFg14BAQQnER4iARAIAxgJFg8JAwIBAgEnChQGDQEHAogpDstZAQEBAQEFAQEBAR6LS4UGB4QrAQSNDIcRmgOKUoIyHIFjLjEBAQGCSAEBAQ Message-ID: <559D0CD3.9000407@internode.on.net> Date: Wed, 08 Jul 2015 21:13:15 +0930 From: Arthur Marsh User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-Version: 1.0 To: Peter Zijlstra CC: Mathieu Desnoyers , linux-kernel@vger.kernel.org, Rusty Russell , rostedt , Oleg Nesterov , "Paul E. McKenney" Subject: Re: lock-up with module: Optimize __module_address() using a latched RB-tree References: <20150706100447.GX3644@twins.programming.kicks-ass.net> <559A545A.80508@internode.on.net> <20150706103246.GY3644@twins.programming.kicks-ass.net> <559B63A2.4030601@internode.on.net> <20150707072951.GM3644@twins.programming.kicks-ass.net> <1736781680.1883.1436286785932.JavaMail.zimbra@efficios.com> <559C3371.2030704@internode.on.net> <20150707215620.GM19282@twins.programming.kicks-ass.net> <20150707221122.GU18673@twins.programming.kicks-ass.net> <559CDFE1.7060503@internode.on.net> <20150708090427.GY3644@twins.programming.kicks-ass.net> In-Reply-To: <20150708090427.GY3644@twins.programming.kicks-ass.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1906 Lines: 61 Peter Zijlstra wrote on 08/07/15 18:34: > On Wed, Jul 08, 2015 at 06:01:29PM +0930, Arthur Marsh wrote: >> >> >> Peter Zijlstra wrote on 08/07/15 07:41: >>> On Tue, Jul 07, 2015 at 11:56:20PM +0200, Peter Zijlstra wrote: >> >>> Could you try the below? It appears there was a spot freeing modules >>> that forgot to take them out of the tree. >>> >>> If that fails, try and disable CONFIG_MODULE_UNLOAD. >> >> I tried the patch below, re-built and installed and booted the kernel and >> saw: >> >> http://www.users.on.net/~arthur.marsh/20150708471.jpg >> http://www.users.on.net/~arthur.marsh/20150708472.jpg > > Ah, that's a lockdep splat, caused by Mathieu's patch. Did the system > boot otherwise? > > Maybe take that patch from Mathieu out again. > OK, I removed Mathieu's 0001-TESTING-add-spinlock-to-module.c-rb-latch-tree.patch but left in the the patch Peter wrote: --- kernel/module.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/module.c b/kernel/module.c index 3e0e19763d24..4d2b82e610e2 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -3557,6 +3557,7 @@ static int load_module(struct load_info *info, const char __user *uargs, mutex_lock(&module_mutex); /* Unlink carefully: kallsyms could be walking list. */ list_del_rcu(&mod->list); + mod_tree_remove(mod); wake_up_all(&module_wq); /* Wait for RCU-sched synchronizing before releasing mod->list. */ synchronize_sched(); and disabled CONFIG_MODULE_UNLOAD and the resulting kernel booted fine. I rebuilt again with CONFIG_MODULE_UNLOAD enabled and Peter's patch above and the resulting kernel also booted fine. Thanks for everyone's help! Arthur. -- 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/