Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757049AbZAGQak (ORCPT ); Wed, 7 Jan 2009 11:30:40 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752274AbZAGQab (ORCPT ); Wed, 7 Jan 2009 11:30:31 -0500 Received: from mail-bw0-f21.google.com ([209.85.218.21]:56811 "EHLO mail-bw0-f21.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752029AbZAGQaa (ORCPT ); Wed, 7 Jan 2009 11:30:30 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=c/w8D8A5RuoDTwT9h17jdDzfFKK4u4cizG4bA9ACQ68HbxqZWWgXN4Lcu7C1G6ZTcl 4/gOi4PUYTfO42Ixmfw/MYL8p1vIjRMKuAdd5ElQthaGNtRrk9x/PcE3wyZexdWlmTrh uuJcnW416aV0w/WPxd5IvWC5G35TZbs9MZgEQ= Message-ID: Date: Wed, 7 Jan 2009 19:30:27 +0300 From: "Alexey Zaytsev" To: LKML Subject: Re: linux-next: Tree for December 11 Cc: "Ingo Molnar" , "Nick Piggin" , "Linus Torvalds" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20081211200459.14d18d7a.sfr@canb.auug.org.au> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5304 Lines: 112 On Sun, Dec 14, 2008 at 17:34, Alexey Zaytsev wrote: > On Thu, Dec 11, 2008 at 15:40, Alexey Zaytsev wrote: >> On Thu, Dec 11, 2008 at 12:04, Stephen Rothwell wrote: >>> Hi all, >>> >>> >>> ---------------------------------------------------------------------------- >> >> Hi. Almost a month later, the warning is still there, and now also in Linus' git. Am I the only one who sees it? [ 0.004000] Intel machine check reporting enabled on CPU#0. [ 0.004000] using mwait in idle threads. [ 0.004000] Checking 'hlt' instruction... <4>------------[ cut here ]------------ [ 0.004150] WARNING: at kernel/sched.c:4435 sub_preempt_count+0xae/0xc0() [ 0.004247] Hardware name: HP Compaq nx7300 (GB848ES#ACB) [ 0.004342] Modules linked in: [ 0.004477] Pid: 0, comm: swapper Not tainted 2.6.28-06859-gede6f5a #179 [ 0.004575] Call Trace: [ 0.004672] [] warn_slowpath+0x86/0xa0 [ 0.004770] [] ? tick_check_oneshot_change+0x4b/0x100 [ 0.004868] [] ? _spin_unlock_irq+0x10/0x30 [ 0.004963] [] sub_preempt_count+0xae/0xc0 [ 0.005060] [] _local_bh_enable+0x27/0xa0 [ 0.005155] [] __do_softirq+0xf7/0x150 [ 0.005250] [] ? __do_softirq+0x0/0x150 [ 0.005345] [] ? tick_nohz_update_jiffies+0xe/0x50 [ 0.005488] [] ? irq_exit+0x7f/0x90 [ 0.005584] [] ? do_IRQ+0xa3/0x120 [ 0.005678] [] ? common_interrupt+0x27/0x2c [ 0.005773] [] ? try_acquire_console_sem+0x1b/0x30 [ 0.005872] [] ? check_bugs+0xb8/0xe0 [ 0.005967] [] ? start_kernel+0x25a/0x2f0 [ 0.006062] [] ? unknown_bootoption+0x0/0x210 [ 0.006159] [] ? __init_begin+0x7c/0xb0 [ 0.006260] ---[ end trace 4eaa2a86a8e2da22 ]--- [ 0.016003] OK. [ 0.016538] ACPI: Core revision 20080926 >> >> I'm seeing this warning early in boot logs. It does not appear on 2.6.28-rc7. >> Not sure how long it's been around. Haven't built -next for some time. >> >> [ 0.004000] Intel machine check reporting enabled on CPU#0. >> [ 0.004000] using mwait in idle threads. >> [ 0.004000] Checking 'hlt' instruction... <4>------------[ cut here >> ]------------ >> [ 0.004167] WARNING: at kernel/sched.c:4364 sub_preempt_count+0xae/0xc0() >> [ 0.004266] Hardware name: HP Compaq nx7300 (GB848ES#ACB) >> [ 0.004361] Modules linked in: >> [ 0.004497] Pid: 0, comm: swapper Not tainted 2.6.28-rc8-next-20081211 #117 >> [ 0.004595] Call Trace: >> [ 0.004689] [] warn_slowpath+0x86/0xa0 >> [ 0.004789] [] ? check_usage_forwards+0x10/0xb0 >> [ 0.004886] [] ? save_trace+0x3a/0xa0 >> [ 0.004981] [] ? mark_lock+0x37d/0xe00 >> [ 0.005076] [] ? __lock_acquire+0x249/0x610 >> [ 0.005175] [] ? _spin_unlock_irq+0x22/0x50 >> [ 0.005272] [] ? trace_hardirqs_on_caller+0x70/0x1a0 >> [ 0.005369] [] ? _spin_unlock_irq+0x2d/0x50 >> [ 0.005465] [] sub_preempt_count+0xae/0xc0 >> [ 0.005564] [] _local_bh_enable+0x52/0xc0 >> [ 0.005661] [] __do_softirq+0x11f/0x170 >> [ 0.005756] [] ? __do_softirq+0x0/0x170 >> [ 0.005851] [] ? irq_exit+0x89/0xa0 >> [ 0.005993] [] ? do_IRQ+0xad/0x120 >> [ 0.006088] [] ? common_interrupt+0x2c/0x34 >> [ 0.006184] [] ? mmput+0x2b/0xc0 >> [ 0.006281] [] ? check_bugs+0xb8/0xe0 >> [ 0.006379] [] ? start_kernel+0x26a/0x310 >> [ 0.006475] [] ? unknown_bootoption+0x0/0x210 >> [ 0.006572] [] ? __init_begin+0x77/0xb0 >> [ 0.006674] ---[ end trace 4eaa2a86a8e2da22 ]--- >> [ 0.016004] OK. >> [ 0.016560] ACPI: Core revision 20081031 >> [ 0.044495] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1 >> >> Config and full dmesg attached. >> > > The warning can also be reproduced in qemu, so it was easy to bisect. > > commit 7317d7b87edb41a9135e30be1ec3f7ef817c53dd > Author: Nick Piggin > Date: Tue Sep 30 20:50:27 2008 +1000 > > sched: improve preempt debugging > > This patch helped me out with a problem I recently had.... > > Basically, when the kernel lock is held, then preempt_count > underflow does not > get detected until it is released which may be a long time (and arbitrarily, > eg at different points it may be rescheduled). If the bkl is released at > schedule, the resulting output is actually fairly cryptic... > > With any other lock that elevates preempt_count, it is illegal to schedule > under it (which would get found pretty quickly). bkl allows scheduling with > preempt_count elevated, which makes underflows hard to debug. > > Signed-off-by: Ingo Molnar > > I understand that not this particular commit is buggy, but at least > I've got someone to add to the CC. ;) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/