Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932294Ab0BCBqM (ORCPT ); Tue, 2 Feb 2010 20:46:12 -0500 Received: from cn.fujitsu.com ([222.73.24.84]:56505 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S932219Ab0BCBqJ (ORCPT ); Tue, 2 Feb 2010 20:46:09 -0500 Message-ID: <4B68D5BA.5030707@cn.fujitsu.com> Date: Wed, 03 Feb 2010 09:47:38 +0800 From: Wei Yongjun User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Peter Zijlstra CC: Yury Polyanskiy , Herbert Xu , "netdev@vger.kernel.org" , "David S. Miller" , polyanskiy@gmail.com, Thomas Gleixner , lkml Subject: Re: [PATCH] hrtimer, softirq: Fix hrtimer->softirq trampoline References: <4B66A670.70503@cn.fujitsu.com> <20100202074914.GD11081@gondor.apana.org.au> <20100202085117.7a5c3530@penta.localdomain> <1265120401.24455.306.camel@laptop> In-Reply-To: <1265120401.24455.306.camel@laptop> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1843 Lines: 51 Peter Zijlstra wrote: > On Tue, 2010-02-02 at 08:51 -0500, Yury Polyanskiy wrote: > > The original email had more information: > > >> {IN-HARDIRQ-W} state was registered at: >> [] __lock_acquire+0xa9c/0x1890 >> [] lock_acquire+0x7f/0xf0 >> [] _raw_spin_lock+0x38/0x50 >> [] xfrm_timer_handler+0x3a/0x260 >> [] __hrtimer_tasklet_trampoline+0xd/0x10 >> [] hrtimer_run_queues+0x15e/0x2a0 >> [] run_local_timers+0xd/0x20 >> [] update_process_times+0x34/0x70 >> [] tick_periodic+0x2a/0x80 >> [] tick_handle_periodic+0x1e/0x90 >> [] smp_apic_timer_interrupt+0x57/0x8b >> [] apic_timer_interrupt+0x2f/0x34 >> [] cpu_idle+0x4b/0x80 >> [] rest_init+0x67/0x70 >> [] start_kernel+0x30e/0x314 >> [] i386_start_kernel+0x9e/0xa5 >> > > Which indicates we were called from hardirq context, it appears that > that hrtimer_is_hres_active() case is indeed faulty. Not sure if I made > a mistake when I wrote that or if we changed hrtimer behaviour > afterwards, but the hrtimer fallback is still from hardirq context. > > Which would seem to suggest the following patch: > > --- > Subject: hrtimer, softirq: Fix hrtimer->softirq trampoline > > hrtimers callbacks are always done from hardirq context, either the > jiffy tick interrupt or the hrtimer device interrupt. > > Signed-off-by: Peter Zijlstra > > With this patch, the inconsistent lock state INFO is gone. Thanks. Wei Yongjun -- 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/