From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758125AbbGQNM6 (ORCPT ); Fri, 17 Jul 2015 09:12:58 -0400 Received: from casper.infradead.org ([85.118.1.10]:49929 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758050AbbGQNM5 (ORCPT ); Fri, 17 Jul 2015 09:12:57 -0400 Date: Fri, 17 Jul 2015 15:12:52 +0200 From: Peter Zijlstra To: Mel Gorman Cc: Andrew Morton , Nicolai Stange , Dave Hansen , Alex Ng , Fengguang Wu , Linux-MM , LKML Subject: Re: [PATCH 1/3] mm, meminit: replace rwsem with completion Message-ID: <20150717131252.GL19282@twins.programming.kicks-ass.net> References: <1437135724-20110-1-git-send-email-mgorman@suse.de> <1437135724-20110-2-git-send-email-mgorman@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1437135724-20110-2-git-send-email-mgorman@suse.de> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 17, 2015 at 01:22:02PM +0100, Mel Gorman wrote: > From: Nicolai Stange > > Commit 0e1cc95b4cc7 ("mm: meminit: finish initialisation of struct pages > before basic setup") introduced a rwsem to signal completion of the > initialization workers. > > Lockdep complains about possible recursive locking: > ============================================= > [ INFO: possible recursive locking detected ] > 4.1.0-12802-g1dc51b8 #3 Not tainted > --------------------------------------------- > swapper/0/1 is trying to acquire lock: > (pgdat_init_rwsem){++++.+}, > at: [] page_alloc_init_late+0xc7/0xe6 > > but task is already holding lock: > (pgdat_init_rwsem){++++.+}, > at: [] page_alloc_init_late+0x3e/0xe6 > > Replace the rwsem by a completion together with an atomic > "outstanding work counter". > > [peterz@infradead.org: Barrier removal on the grounds of being pointless] > [mgorman@suse.de: Applied review feedback] > Signed-off-by: Nicolai Stange > Signed-off-by: Mel Gorman Acked-by: Peter Zijlstra (Intel) Thanks!