* lockdep warning on block tree for-2.6.35 branch
@ 2010-04-16 1:40 Gui Jianfeng
2010-04-16 3:51 ` Divyesh Shah
0 siblings, 1 reply; 3+ messages in thread
From: Gui Jianfeng @ 2010-04-16 1:40 UTC (permalink / raw)
To: Divyesh Shah, Vivek Goyal; +Cc: Jens Axboe, linux kernel mailing list, Li Zefan
Hi
I got the following warning when testing.
INFO: trying to register non-static key.
the code is fine but needs lockdep annotation.
turning off the locking correctness validator.
Pid: 3298, comm: find Not tainted 2.6.34-rc4-Vivek-Blkio #48
Call Trace:
[<c04558bf>] __lock_acquire+0x166/0x789
[<c0455f76>] lock_acquire+0x94/0xb1
[<fa7c06d9>] ? blkiocg_update_io_add_stats+0x21/0xe5 [blk_cgroup]
[<c068e1e2>] _raw_spin_lock_irqsave+0x27/0x5a
[<fa7c06d9>] ? blkiocg_update_io_add_stats+0x21/0xe5 [blk_cgroup]
[<fa7c06d9>] blkiocg_update_io_add_stats+0x21/0xe5 [blk_cgroup]
[<fa816886>] cfq_insert_request+0xdc/0x4f2 [cfq_iosched]
[<c0451b48>] ? trace_hardirqs_off+0xb/0xd
[<c052b7e9>] elv_insert+0xe0/0x174
[<c052b90c>] __elv_add_request+0x8f/0x94
[<c05314e2>] __make_request+0x357/0x389
[<c04d6b44>] ? __find_get_block+0x15d/0x167
[<c052faa0>] generic_make_request+0x27f/0x321
[<c0491017>] ? mempool_alloc_slab+0xe/0x10
[<c0491287>] ? mempool_alloc+0x3c/0xd7
[<c0531186>] submit_bio+0x8a/0x8f
[<c04da90a>] ? bio_alloc_bioset+0x37/0x96
[<c04d656f>] submit_bh+0xf0/0x10f
[<c04d7556>] ll_rw_block+0xc0/0xf9
[<f86e717c>] ext3_bread+0x34/0x7b [ext3]
[<f86ea875>] htree_dirblock_to_tree+0x1f/0x120 [ext3]
[<f86ea9f0>] ext3_htree_fill_tree+0x7a/0x1bb [ext3]
[<c0453147>] ? mark_held_locks+0x3d/0x58
[<c04b29ce>] ? kmem_cache_alloc_notrace+0x86/0xaa
[<c0453269>] ? trace_hardirqs_on_caller+0x107/0x12f
[<f86e3b53>] ext3_readdir+0x1f9/0x69e [ext3]
[<c04c68ec>] ? filldir64+0x0/0xcd
[<c068d4fe>] ? mutex_lock_killable_nested+0x2c5/0x2d9
[<c0450b5f>] ? debug_mutex_free_waiter+0x45/0x48
[<c068d508>] ? mutex_lock_killable_nested+0x2cf/0x2d9
[<c04c6ac7>] ? vfs_readdir+0x46/0x94
[<c04c6ae9>] vfs_readdir+0x68/0x94
[<c04c68ec>] ? filldir64+0x0/0xcd
[<c04c6b73>] sys_getdents64+0x5e/0x9f
[<c040274c>] sysenter_do_call+0x12/0x32
Thanks,
Gui
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: lockdep warning on block tree for-2.6.35 branch
2010-04-16 1:40 lockdep warning on block tree for-2.6.35 branch Gui Jianfeng
@ 2010-04-16 3:51 ` Divyesh Shah
2010-04-16 3:57 ` Li Zefan
0 siblings, 1 reply; 3+ messages in thread
From: Divyesh Shah @ 2010-04-16 3:51 UTC (permalink / raw)
To: Gui Jianfeng; +Cc: Vivek Goyal, Jens Axboe, linux kernel mailing list, Li Zefan
Hi Gui,
Thanks for the report. I can reproduce this and have a patch that
fixes it and makes the warning go away. My understanding of what was
happening is that the stats_lock for the root cfqg was not getting
initialized and hence was missing the static lock_class_key
declaration. This is because we call blkio_group_init() only when
dynamically allocating new cfqg which does not cover the root cfqg.
I'll send out the patch next.
-Divyesh
On Thu, Apr 15, 2010 at 6:40 PM, Gui Jianfeng
<guijianfeng@cn.fujitsu.com> wrote:
> Hi
>
> I got the following warning when testing.
>
> INFO: trying to register non-static key.
> the code is fine but needs lockdep annotation.
> turning off the locking correctness validator.
> Pid: 3298, comm: find Not tainted 2.6.34-rc4-Vivek-Blkio #48
> Call Trace:
> [<c04558bf>] __lock_acquire+0x166/0x789
> [<c0455f76>] lock_acquire+0x94/0xb1
> [<fa7c06d9>] ? blkiocg_update_io_add_stats+0x21/0xe5 [blk_cgroup]
> [<c068e1e2>] _raw_spin_lock_irqsave+0x27/0x5a
> [<fa7c06d9>] ? blkiocg_update_io_add_stats+0x21/0xe5 [blk_cgroup]
> [<fa7c06d9>] blkiocg_update_io_add_stats+0x21/0xe5 [blk_cgroup]
> [<fa816886>] cfq_insert_request+0xdc/0x4f2 [cfq_iosched]
> [<c0451b48>] ? trace_hardirqs_off+0xb/0xd
> [<c052b7e9>] elv_insert+0xe0/0x174
> [<c052b90c>] __elv_add_request+0x8f/0x94
> [<c05314e2>] __make_request+0x357/0x389
> [<c04d6b44>] ? __find_get_block+0x15d/0x167
> [<c052faa0>] generic_make_request+0x27f/0x321
> [<c0491017>] ? mempool_alloc_slab+0xe/0x10
> [<c0491287>] ? mempool_alloc+0x3c/0xd7
> [<c0531186>] submit_bio+0x8a/0x8f
> [<c04da90a>] ? bio_alloc_bioset+0x37/0x96
> [<c04d656f>] submit_bh+0xf0/0x10f
> [<c04d7556>] ll_rw_block+0xc0/0xf9
> [<f86e717c>] ext3_bread+0x34/0x7b [ext3]
> [<f86ea875>] htree_dirblock_to_tree+0x1f/0x120 [ext3]
> [<f86ea9f0>] ext3_htree_fill_tree+0x7a/0x1bb [ext3]
> [<c0453147>] ? mark_held_locks+0x3d/0x58
> [<c04b29ce>] ? kmem_cache_alloc_notrace+0x86/0xaa
> [<c0453269>] ? trace_hardirqs_on_caller+0x107/0x12f
> [<f86e3b53>] ext3_readdir+0x1f9/0x69e [ext3]
> [<c04c68ec>] ? filldir64+0x0/0xcd
> [<c068d4fe>] ? mutex_lock_killable_nested+0x2c5/0x2d9
> [<c0450b5f>] ? debug_mutex_free_waiter+0x45/0x48
> [<c068d508>] ? mutex_lock_killable_nested+0x2cf/0x2d9
> [<c04c6ac7>] ? vfs_readdir+0x46/0x94
> [<c04c6ae9>] vfs_readdir+0x68/0x94
> [<c04c68ec>] ? filldir64+0x0/0xcd
> [<c04c6b73>] sys_getdents64+0x5e/0x9f
> [<c040274c>] sysenter_do_call+0x12/0x32
>
> Thanks,
> Gui
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: lockdep warning on block tree for-2.6.35 branch
2010-04-16 3:51 ` Divyesh Shah
@ 2010-04-16 3:57 ` Li Zefan
0 siblings, 0 replies; 3+ messages in thread
From: Li Zefan @ 2010-04-16 3:57 UTC (permalink / raw)
To: Divyesh Shah
Cc: Gui Jianfeng, Vivek Goyal, Jens Axboe, linux kernel mailing list
Divyesh Shah :
> Hi Gui,
> Thanks for the report. I can reproduce this and have a patch that
> fixes it and makes the warning go away. My understanding of what was
> happening is that the stats_lock for the root cfqg was not getting
> initialized and hence was missing the static lock_class_key
> declaration. This is because we call blkio_group_init() only when
> dynamically allocating new cfqg which does not cover the root cfqg.
> I'll send out the patch next.
>
We just found out the cause and was about to make a fix. :)
-- Li
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-04-16 3:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-16 1:40 lockdep warning on block tree for-2.6.35 branch Gui Jianfeng
2010-04-16 3:51 ` Divyesh Shah
2010-04-16 3:57 ` Li Zefan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).