Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935773AbdCYBjM (ORCPT ); Fri, 24 Mar 2017 21:39:12 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:35420 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751965AbdCYBjC (ORCPT ); Fri, 24 Mar 2017 21:39:02 -0400 Date: Sat, 25 Mar 2017 10:37:50 +0900 From: Sergey Senozhatsky To: Steven Rostedt Cc: Sergey Senozhatsky , Sebastian Ott , Petr Mladek , Andrew Morton , Thomas Gleixner , Peter Zijlstra , Linus Torvalds , Michal Hocko , Heiko Carstens , Martin Schwidefsky , linux-kernel@vger.kernel.org, Sergey Senozhatsky Subject: Re: lockdep warning: console vs. mem hotplug Message-ID: <20170325013750.GF6356@tigerII.localdomain> References: <20170321044421.GB448@jagdpanzerIV.localdomain> <20170325000442.GD6356@tigerII.localdomain> <20170324210853.12268442@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170324210853.12268442@gandalf.local.home> 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: 1494 Lines: 50 On (03/24/17 21:08), Steven Rostedt 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); > > > My fear is that this will trigger for any printk in page_alloc.c under > the zone lock. absolutely true. I Cc'd debugobjects, mm and sclp_console maintainers because the real (smart) solution to the problem is somewhere there. another problem (not reported) is that we have conflicting dependencies mod_timer -> sclp_console sclp_console -> mod_timer which can result in a deadlock: mod_timer -> debugobjects -> printk -> sclp_console -> mod_timer this one, I think, can be addressed by switching to a printk_safe in debugobjects. // I'm traveling now. there will be delays in replies, sorry. -ss