Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932318AbdC3D7v (ORCPT ); Wed, 29 Mar 2017 23:59:51 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:35475 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932191AbdC3D7t (ORCPT ); Wed, 29 Mar 2017 23:59:49 -0400 Date: Thu, 30 Mar 2017 12:59:47 +0900 From: Sergey Senozhatsky To: Michal Hocko Cc: Sergey Senozhatsky , Sebastian Ott , Petr Mladek , Steven Rostedt , Andrew Morton , Thomas Gleixner , Peter Zijlstra , Linus Torvalds , Heiko Carstens , Martin Schwidefsky , linux-kernel@vger.kernel.org, Sergey Senozhatsky Subject: Re: lockdep warning: console vs. mem hotplug Message-ID: <20170330035947.GA513@jagdpanzerIV.localdomain> References: <20170321044421.GB448@jagdpanzerIV.localdomain> <20170325000442.GD6356@tigerII.localdomain> <20170328142226.GK18241@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170328142226.GK18241@dhcp22.suse.cz> User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1501 Lines: 41 On (03/28/17 16:22), Michal Hocko wrote: [..] > > Sebastian, does this change make lockdep happy? > > > > it removes console drivers from the __offline_isolated_pages(). not the > > best solution I can think of, but the simplest one. > > > > --- > > > > mm/page_alloc.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > > index f749b7ff7c50..eb61e6ab5f4f 100644 > > --- a/mm/page_alloc.c > > +++ b/mm/page_alloc.c > > @@ -7705,7 +7705,7 @@ __offline_isolated_pages(unsigned long start_pfn, unsigned long end_pfn) > > BUG_ON(!PageBuddy(page)); > > order = page_order(page); > > #ifdef CONFIG_DEBUG_VM > > - pr_info("remove from free list %lx %d %lx\n", > > + printk_deferred(KERN_INFO "remove from free list %lx %d %lx\n", > > pfn, 1 << order, end_pfn); > > #endif > > list_del(&page->lru); > > I believe this is not a proper fix. oh, absolutely. I hate it. didn't really propose it as a fix. mostly did it just to verify that there are no other lock inversions behind the one that has been reported (lockdep turns off itself when it detects the first lock dependency inversion). > Although this code is ugly and maybe it doesn't really need zone->lock > because that should be the page allocator internal thing the problem is > that printk shouldn't impose such a subtle dependency on locks. Why does > the timer needs to allocate at all? I believe Petr has answered your questions. sorry for the delay. -ss