From: Wei Yongjun <yjwei@cn.fujitsu.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Yury Polyanskiy <ypolyans@princeton.edu>,
Herbert Xu <herbert@gondor.apana.org.au>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
polyanskiy@gmail.com, Thomas Gleixner <tglx@linutronix.de>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] hrtimer, softirq: Fix hrtimer->softirq trampoline
Date: Wed, 03 Feb 2010 09:47:38 +0800 [thread overview]
Message-ID: <4B68D5BA.5030707@cn.fujitsu.com> (raw)
In-Reply-To: <1265120401.24455.306.camel@laptop>
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:
>> [<c04718dc>] __lock_acquire+0xa9c/0x1890
>> [<c047274f>] lock_acquire+0x7f/0xf0
>> [<c0762958>] _raw_spin_lock+0x38/0x50
>> [<c072b5ca>] xfrm_timer_handler+0x3a/0x260
>> [<c0447d9d>] __hrtimer_tasklet_trampoline+0xd/0x10
>> [<c04634ce>] hrtimer_run_queues+0x15e/0x2a0
>> [<c045146d>] run_local_timers+0xd/0x20
>> [<c04514b4>] update_process_times+0x34/0x70
>> [<c046ce8a>] tick_periodic+0x2a/0x80
>> [<c046cefe>] tick_handle_periodic+0x1e/0x90
>> [<c0768377>] smp_apic_timer_interrupt+0x57/0x8b
>> [<c076382f>] apic_timer_interrupt+0x2f/0x34
>> [<c0401d3b>] cpu_idle+0x4b/0x80
>> [<c074e0d7>] rest_init+0x67/0x70
>> [<c0956874>] start_kernel+0x30e/0x314
>> [<c095609e>] 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 <a.p.zijlstra@chello.nl>
>
>
With this patch, the inconsistent lock state INFO is gone. Thanks.
Wei Yongjun
next prev parent reply other threads:[~2010-02-03 1:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4B66A670.70503@cn.fujitsu.com>
[not found] ` <20100202074914.GD11081@gondor.apana.org.au>
[not found] ` <20100202085117.7a5c3530@penta.localdomain>
2010-02-02 14:20 ` [PATCH] hrtimer, softirq: Fix hrtimer->softirq trampoline Peter Zijlstra
2010-02-02 14:28 ` Yury Polyanskiy
2010-02-02 14:35 ` Peter Zijlstra
2010-02-03 1:47 ` Wei Yongjun [this message]
2010-02-03 16:56 ` David Miller
2010-02-03 17:21 ` [tip:timers/urgent] " tip-bot for Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B68D5BA.5030707@cn.fujitsu.com \
--to=yjwei@cn.fujitsu.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=polyanskiy@gmail.com \
--cc=tglx@linutronix.de \
--cc=ypolyans@princeton.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox