Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758251Ab0DPDwF (ORCPT ); Thu, 15 Apr 2010 23:52:05 -0400 Received: from smtp-out.google.com ([216.239.44.51]:45399 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757702Ab0DPDwB convert rfc822-to-8bit (ORCPT ); Thu, 15 Apr 2010 23:52:01 -0400 DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:in-reply-to:references:from:date:message-id: subject:to:cc:content-type:content-transfer-encoding:x-system-of-record; b=ELhgNy2zHy4sNEcoxvEE6Pne1KuSDH6YDKYaX468sEZB34XhJUZcINuCrwSj5Qnu4 H/0fAUCCHFT95HlklCQ1w== MIME-Version: 1.0 In-Reply-To: <4BC7C005.2090100@cn.fujitsu.com> References: <4BC7C005.2090100@cn.fujitsu.com> From: Divyesh Shah Date: Thu, 15 Apr 2010 20:51:36 -0700 Message-ID: Subject: Re: lockdep warning on block tree for-2.6.35 branch To: Gui Jianfeng Cc: Vivek Goyal , Jens Axboe , linux kernel mailing list , Li Zefan Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT X-System-Of-Record: true Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2734 Lines: 67 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 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: > ?[] __lock_acquire+0x166/0x789 > ?[] lock_acquire+0x94/0xb1 > ?[] ? blkiocg_update_io_add_stats+0x21/0xe5 [blk_cgroup] > ?[] _raw_spin_lock_irqsave+0x27/0x5a > ?[] ? blkiocg_update_io_add_stats+0x21/0xe5 [blk_cgroup] > ?[] blkiocg_update_io_add_stats+0x21/0xe5 [blk_cgroup] > ?[] cfq_insert_request+0xdc/0x4f2 [cfq_iosched] > ?[] ? trace_hardirqs_off+0xb/0xd > ?[] elv_insert+0xe0/0x174 > ?[] __elv_add_request+0x8f/0x94 > ?[] __make_request+0x357/0x389 > ?[] ? __find_get_block+0x15d/0x167 > ?[] generic_make_request+0x27f/0x321 > ?[] ? mempool_alloc_slab+0xe/0x10 > ?[] ? mempool_alloc+0x3c/0xd7 > ?[] submit_bio+0x8a/0x8f > ?[] ? bio_alloc_bioset+0x37/0x96 > ?[] submit_bh+0xf0/0x10f > ?[] ll_rw_block+0xc0/0xf9 > ?[] ext3_bread+0x34/0x7b [ext3] > ?[] htree_dirblock_to_tree+0x1f/0x120 [ext3] > ?[] ext3_htree_fill_tree+0x7a/0x1bb [ext3] > ?[] ? mark_held_locks+0x3d/0x58 > ?[] ? kmem_cache_alloc_notrace+0x86/0xaa > ?[] ? trace_hardirqs_on_caller+0x107/0x12f > ?[] ext3_readdir+0x1f9/0x69e [ext3] > ?[] ? filldir64+0x0/0xcd > ?[] ? mutex_lock_killable_nested+0x2c5/0x2d9 > ?[] ? debug_mutex_free_waiter+0x45/0x48 > ?[] ? mutex_lock_killable_nested+0x2cf/0x2d9 > ?[] ? vfs_readdir+0x46/0x94 > ?[] vfs_readdir+0x68/0x94 > ?[] ? filldir64+0x0/0xcd > ?[] sys_getdents64+0x5e/0x9f > ?[] sysenter_do_call+0x12/0x32 > > Thanks, > Gui > > -- 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/