From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Whitehouse Date: Thu, 12 Nov 2009 14:29:18 +0000 Subject: [Cluster-devel] Re: [PATCH 2/2] dlm: Add down/up_write_non_owner to keep lockdep happy In-Reply-To: <20091112142211.GA468@elte.hu> References: <1255445776-3112-1-git-send-email-swhiteho@redhat.com> <1255445776-3112-2-git-send-email-swhiteho@redhat.com> <1255445776-3112-3-git-send-email-swhiteho@redhat.com> <20091112142211.GA468@elte.hu> Message-ID: <1258036158.6052.874.camel@localhost.localdomain> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, On Thu, 2009-11-12 at 15:22 +0100, Ingo Molnar wrote: > * Steven Whitehouse wrote: > > > I looked at possibly changing this to use completions, but > > it seems that the usage here is not easily adapted to that. > > This patch adds suitable annotation to the write side of > > the ls_in_recovery semaphore so that we don't get nasty > > messages from lockdep when mounting a gfs2 filesystem. > > What do those 'nasty messages' say? If they expose some bug and this > patch works around that bug by hiding it then NAK ... > > Ingo > The nasty messages are moaning that the lock is being taken in one thread and unlocked in another. I couldn't see any bugs in the code when I looked at it. Below are the messages that I get - to reproduce just mount a GFS2 filesystem with the dlm lock manager. It happens on every mount, Steve. Nov 12 15:10:01 chywoon kernel: ============================================= Nov 12 15:10:01 chywoon kernel: [ INFO: possible recursive locking detected ] Nov 12 15:10:01 chywoon kernel: 2.6.32-rc6 #46 Nov 12 15:10:01 chywoon kernel: --------------------------------------------- Nov 12 15:10:01 chywoon kernel: mount.gfs2/2996 is trying to acquire lock: Nov 12 15:10:01 chywoon kernel: (&ls->ls_in_recovery){+++++.}, at: [] dlm_lock+0x55/0x1b0 [dlm] Nov 12 15:10:01 chywoon kernel: Nov 12 15:10:01 chywoon kernel: but task is already holding lock: Nov 12 15:10:01 chywoon kernel: (&ls->ls_in_recovery){+++++.}, at: [] dlm_new_lockspace+0x96c/0xb80 [dlm] Nov 12 15:10:01 chywoon kernel: Nov 12 15:10:01 chywoon kernel: other info that might help us debug this: Nov 12 15:10:01 chywoon kernel: 2 locks held by mount.gfs2/2996: Nov 12 15:10:01 chywoon kernel: #0: (&type->s_umount_key#37/1){+.+.+.}, at: [] sget+0x258/0x4c0 Nov 12 15:10:01 chywoon kernel: #1: (&ls->ls_in_recovery){+++++.}, at: [] dlm_new_lockspace+0x96c/0xb80 [dlm] Nov 12 15:10:01 chywoon kernel: Nov 12 15:10:01 chywoon kernel: stack backtrace: Nov 12 15:10:01 chywoon kernel: Pid: 2996, comm: mount.gfs2 Not tainted 2.6.32-rc6 #46 Nov 12 15:10:01 chywoon kernel: Call Trace: Nov 12 15:10:01 chywoon kernel: [] validate_chain +0xdd4/0x1170 Nov 12 15:10:01 chywoon kernel: [] ? mark_lock +0x2e5/0x670 Nov 12 15:10:01 chywoon kernel: [] __lock_acquire +0x532/0xbc0 Nov 12 15:10:01 chywoon kernel: [] ? native_sched_clock+0x2c/0x80 Nov 12 15:10:01 chywoon kernel: [] lock_acquire +0xc4/0x1b0 Nov 12 15:10:01 chywoon kernel: [] ? dlm_lock +0x55/0x1b0 [dlm] Nov 12 15:10:01 chywoon kernel: [] down_read+0x47/0x80 Nov 12 15:10:01 chywoon kernel: [] ? dlm_lock +0x55/0x1b0 [dlm] Nov 12 15:10:01 chywoon kernel: [] ? dlm_find_lockspace_local+0x46/0x60 [dlm] Nov 12 15:10:01 chywoon kernel: [] dlm_lock+0x55/0x1b0 [dlm] Nov 12 15:10:01 chywoon kernel: [] ? sched_clock +0x13/0x20 Nov 12 15:10:01 chywoon kernel: [] ? sched_clock_cpu +0xed/0x140 Nov 12 15:10:01 chywoon kernel: [] ? put_lock_stats +0xe/0x30 Nov 12 15:10:01 chywoon kernel: [] ? lock_release_holdtime+0xb1/0x160 Nov 12 15:10:01 chywoon kernel: [] gdlm_lock +0xe5/0x120 [gfs2] Nov 12 15:10:01 chywoon kernel: [] ? gdlm_ast+0x0/0xd0 [gfs2] Nov 12 15:10:01 chywoon kernel: [] ? gdlm_bast +0x0/0x50 [gfs2] Nov 12 15:10:01 chywoon kernel: [] do_xmote+0xf3/0x2c0 [gfs2] Nov 12 15:10:01 chywoon kernel: [] run_queue +0x1a1/0x280 [gfs2] Nov 12 15:10:01 chywoon kernel: [] gfs2_glock_nq +0x134/0x3b0 [gfs2] Nov 12 15:10:01 chywoon kernel: [] gfs2_glock_nq_num +0x69/0x90 [gfs2] Nov 12 15:10:01 chywoon kernel: [] init_locking +0x45/0x190 [gfs2] Nov 12 15:10:01 chywoon kernel: [] gfs2_get_sb +0x8d0/0xc10 [gfs2] Nov 12 15:10:01 chywoon kernel: [] ? gfs2_glock_nq_num +0x61/0x90 [gfs2] Nov 12 15:10:01 chywoon kernel: [] ? __alloc_percpu +0xb/0x10 Nov 12 15:10:01 chywoon kernel: [] vfs_kern_mount +0x58/0xf0 Nov 12 15:10:01 chywoon kernel: [] do_kern_mount +0x4d/0x130 Nov 12 15:10:01 chywoon kernel: [] ? lock_kernel +0x42/0x109 Nov 12 15:10:01 chywoon kernel: [] do_mount +0x2c4/0x820 Nov 12 15:10:01 chywoon kernel: [] sys_mount+0x8b/0xe0 Nov 12 15:10:01 chywoon kernel: [] system_call_fastpath+0x16/0x1b