Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965467AbdCYBJM (ORCPT ); Fri, 24 Mar 2017 21:09:12 -0400 Received: from mail.kernel.org ([198.145.29.136]:39388 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965171AbdCYBI7 (ORCPT ); Fri, 24 Mar 2017 21:08:59 -0400 Date: Fri, 24 Mar 2017 21:08:53 -0400 From: Steven Rostedt To: Sergey Senozhatsky Cc: 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: <20170324210853.12268442@gandalf.local.home> In-Reply-To: <20170325000442.GD6356@tigerII.localdomain> References: <20170321044421.GB448@jagdpanzerIV.localdomain> <20170325000442.GD6356@tigerII.localdomain> X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1506 Lines: 52 On Sat, 25 Mar 2017 09:04:42 +0900 Sergey Senozhatsky wrote: > On (03/21/17 13:44), Sergey Senozhatsky wrote: > [..] > > so we probably can > > > > > > 1) move pr_info() out of zone->lock in __offline_isolated_pages(). > > meh... > > > > > > 2) switch to printk_deferred() in __offline_isolated_pages(). > > meh.. there might a bunch of other printks done from under zone->lock. > > > > > > 3) move add_timer() out of sclp_con_lock console in sclp_console_write(). > > well, there can be other consoles that do something similar. > > > > > > 4) ... something smart. > > > 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. -- Steve