From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751475Ab2DBJME (ORCPT ); Mon, 2 Apr 2012 05:12:04 -0400 Received: from www.linutronix.de ([62.245.132.108]:48678 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750761Ab2DBJMB (ORCPT ); Mon, 2 Apr 2012 05:12:01 -0400 Date: Mon, 2 Apr 2012 11:12:00 +0200 (CEST) From: Thomas Gleixner To: Sasha Levin cc: LKML , Peter Zijlstra Subject: Re: [PATCH] debugobjects: Use GFP_ATOMIC to allocate when initializing In-Reply-To: Message-ID: References: <1333228972-4594-1-git-send-email-levinsasha928@gmail.com> User-Agent: Alpine 2.02 (LFD 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 1 Apr 2012, Sasha Levin wrote: > On Sun, Apr 1, 2012 at 7:36 PM, Thomas Gleixner wrote: > > On Sat, 31 Mar 2012, Sasha Levin wrote: Peter ???? > >> During the init stage, we have only 1 cpu and run with IRQs disabled, > >> we can't allocate with GFP_KERNEL. > >> > >> This also fixes the related warning on boot. > > > > Hrmm. This should not be the case. In early boot GFP_KERNEL > > allocations should not trigger a warning when interrupts are > > disabled. Which kind of warning are you observing ? > > There were two, both pointing at the same WARN(). I don't have the > first one which was fixed in this patch handy, but the second one is: > > [ 0.000000] WARNING: at kernel/lockdep.c:2739 > lockdep_trace_alloc+0x11f/0x130() > [ 0.000000] Pid: 0, comm: swapper/0 Not tainted > 3.3.0-next-20120330-sasha-dirty #40 > [ 0.000000] Call Trace: > [ 0.000000] [] warn_slowpath_common+0x75/0xb0 > [ 0.000000] [] warn_slowpath_null+0x15/0x20 > [ 0.000000] [] lockdep_trace_alloc+0x11f/0x130 > [ 0.000000] [] __alloc_pages_nodemask+0x9c/0x260 > [ 0.000000] [] ? retint_restore_args+0x6/0x13 > [ 0.000000] [] kmemcheck_alloc_shadow+0x4d/0xf0 > [ 0.000000] [] allocate_slab+0x197/0x270 > [ 0.000000] [] new_slab+0x2b/0x190 > [ 0.000000] [] ? __slab_alloc+0x5a/0x6b0 > [ 0.000000] [] __slab_alloc+0x493/0x6b0 > [ 0.000000] [] ? trace_hardirqs_off_caller+0xe1/0x150 > [ 0.000000] [] ? trace_hardirqs_off_thunk+0x3a/0x3c > [ 0.000000] [] ? > debug_objects_replace_static_objects+0x2a/0x1f5 > [ 0.000000] [] ? > debug_objects_replace_static_objects+0x2a/0x1f5 > [ 0.000000] [] kmem_cache_alloc+0x17e/0x1a0 > [ 0.000000] [] > debug_objects_replace_static_objects+0x2a/0x1f5 > [ 0.000000] [] debug_objects_mem_init+0x39/0x68 > [ 0.000000] [] start_kernel+0x33a/0x3f8 > [ 0.000000] [] ? kernel_init+0x280/0x280 > [ 0.000000] [] x86_64_start_reservations+0xa1/0xa6 > [ 0.000000] [] x86_64_start_kernel+0x155/0x164 > [ 0.000000] ---[ end trace a7919e7f17c0a725 ]---