From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754721AbbGQFGw (ORCPT ); Fri, 17 Jul 2015 01:06:52 -0400 Received: from mail-lb0-f179.google.com ([209.85.217.179]:33417 "EHLO mail-lb0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752420AbbGQFGv (ORCPT ); Fri, 17 Jul 2015 01:06:51 -0400 MIME-Version: 1.0 In-Reply-To: <20150716175139.GB2561@suse.de> References: <20150714000910.GA8160@wfg-t540p.sh.intel.com> <20150714103108.GA6812@suse.de> <20150716175139.GB2561@suse.de> Date: Fri, 17 Jul 2015 08:06:49 +0300 Message-ID: Subject: Re: [mminit] [ INFO: possible recursive locking detected ] From: Konstantin Khlebnikov To: Mel Gorman Cc: Fengguang Wu , Andrew Morton , Peter Zijlstra , Nicolai Stange , Linux Memory Management List , Linux Kernel Mailing List , LKP Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 16, 2015 at 8:51 PM, Mel Gorman wrote: > On Thu, Jul 16, 2015 at 08:13:38PM +0300, Konstantin Khlebnikov wrote: >> > @@ -1187,14 +1195,14 @@ void __init page_alloc_init_late(void) >> > {pgdat_init_rwsempgdat_init_rwsempgdat_init_rwsem >> > int nid; >> > >> > + /* There will be num_node_state(N_MEMORY) threads */ >> > + atomic_set(&pgdat_init_n_undone, num_node_state(N_MEMORY)); >> > for_each_node_state(nid, N_MEMORY) { >> > - down_read(&pgdat_init_rwsem); >> >> Rw-sem have special "non-owner" mode for keeping lockdep away. >> This should be enough: >> > > I think in this case that the completions look nicer though so I think > I'll keep them. Ok. Not a big deal, they are anyway in init sections. BTW there's another option: wait_on_atomic_t / wake_up_atomic_t like wait_on_bit but atomic_t > > -- > Mel Gorman > SUSE Labs