From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Gao Xiang <hsiangkao@redhat.com>
Cc: linux-xfs@vger.kernel.org, Dave Chinner <david@fromorbit.com>,
Brian Foster <bfoster@redhat.com>
Subject: Re: [RFC PATCH v4 0/3] xfs: more unlinked inode list optimization v4
Date: Wed, 19 Aug 2020 19:46:18 -0700 [thread overview]
Message-ID: <20200820024618.GG6096@magnolia> (raw)
In-Reply-To: <20200818133015.25398-1-hsiangkao@redhat.com>
Hm. I saw the following warning from lockdep when running generic/078 with:
MKFS_OPTIONS -- -m reflink=1,rmapbt=1 -i sparse=1
MOUNT_OPTIONS -- -o usrquota,grpquota,prjquota,
CHECK_OPTIONS -- -g auto
XFS_MKFS_OPTIONS -- -bsize=4096
The test kernel is 5.9-rc1 + inobtcount + y2038 + dave's iunlink series + yours
+[ 516.166575] run fstests generic/078 at 2020-08-19 15:35:28
+[ 516.659584] XFS (sda): Mounting V5 Filesystem
+[ 516.846982] XFS (sda): Ending clean mount
+[ 516.849669] xfs filesystem being mounted at /mnt supports timestamps until 2038 (0x7fffffff)
+
+[ 517.341920] ============================================
+[ 517.342849] WARNING: possible recursive locking detected
+[ 517.343832] 5.9.0-rc1-djw #rc1 Tainted: G W
+[ 517.344862] --------------------------------------------
+[ 517.345886] renameat2/107505 is trying to acquire lock:
+[ 517.346830] ffff88803ca48468 (&pag->pag_iunlink_mutex){+.+.}-{3:3}, at: xfs_iunlink+0xb8/0x3f0 [xfs]
+[ 517.348460]
+ but task is already holding lock:
+[ 517.349107] ffff88803ca4bc68 (&pag->pag_iunlink_mutex){+.+.}-{3:3}, at: xfs_iunlink_remove+0x239/0x3f0 [xfs]
+[ 517.350240]
+ other info that might help us debug this:
+[ 517.351166] Possible unsafe locking scenario:
+
+[ 517.351902] CPU0
+[ 517.352399] ----
+[ 517.352895] lock(&pag->pag_iunlink_mutex);
+[ 517.353572] lock(&pag->pag_iunlink_mutex);
+[ 517.354387]
+ *** DEADLOCK ***
+
+[ 517.355394] May be due to missing lock nesting notation
+
+[ 517.356132] 9 locks held by renameat2/107505:
+[ 517.356615] #0: ffff888032b78468 (sb_writers#12){.+.+}-{0:0}, at: mnt_want_write+0x24/0x60
+[ 517.357561] #1: ffff88803d00bfe8 (&inode->i_sb->s_type->i_mutex_dir_key/1){+.+.}-{3:3}, at: lock_rename+0xf5/0x100
+[ 517.358912] #2: ffff88803d00fbe8 (&inode->i_sb->s_type->i_mutex_dir_key){++++}-{3:3}, at: vfs_rename+0x17d/0x950
+[ 517.360011] #3: ffff888032b78688 (sb_internal){.+.+}-{0:0}, at: xfs_trans_alloc+0x18b/0x250 [xfs]
+[ 517.361018] #4: ffff88803d00f8f0 (&xfs_dir_ilock_class){++++}-{3:3}, at: xfs_ilock+0xcf/0x2a0 [xfs]
+[ 517.362063] #5: ffff88803d00bcf0 (&xfs_dir_ilock_class){++++}-{3:3}, at: xfs_ilock_nowait+0xcf/0x340 [xfs]
+[ 517.363173] #6: ffff88803bf82df0 (&xfs_nondir_ilock_class){++++}-{3:3}, at: xfs_ilock_nowait+0xcf/0x340 [xfs]
+[ 517.364685] #7: ffff88803d00cbf0 (&xfs_dir_ilock_class){++++}-{3:3}, at: xfs_ilock_nowait+0xcf/0x340 [xfs]
+[ 517.366414] #8: ffff88803ca4bc68 (&pag->pag_iunlink_mutex){+.+.}-{3:3}, at: xfs_iunlink_remove+0x239/0x3f0 [xfs]
+[ 517.367787]
+ stack backtrace:
+[ 517.368285] CPU: 1 PID: 107505 Comm: renameat2 Tainted: G W 5.9.0-rc1-djw #rc1
+[ 517.369196] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-1ubuntu1 04/01/2014
+[ 517.370401] Call Trace:
+[ 517.370703] dump_stack+0x7c/0xac
+[ 517.371091] __lock_acquire.cold+0x168/0x2ab
+[ 517.371571] lock_acquire+0xa2/0x370
+[ 517.372025] ? xfs_iunlink+0xb8/0x3f0 [xfs]
+[ 517.372505] __mutex_lock+0xa1/0xa00
+[ 517.372955] ? xfs_iunlink+0xb8/0x3f0 [xfs]
+[ 517.373455] ? kvm_clock_read+0x14/0x30
+[ 517.373898] ? kvm_sched_clock_read+0x9/0x20
+[ 517.374379] ? sched_clock_cpu+0x14/0xe0
+[ 517.374897] ? xfs_iunlink+0xb8/0x3f0 [xfs]
+[ 517.375405] ? xfs_iunlink+0x94/0x3f0 [xfs]
+[ 517.376185] ? rcu_read_lock_sched_held+0x56/0x80
+[ 517.377055] ? xfs_iunlink+0xb8/0x3f0 [xfs]
+[ 517.377896] xfs_iunlink+0xb8/0x3f0 [xfs]
+[ 517.378703] xfs_rename+0xdb8/0x1030 [xfs]
+[ 517.379261] xfs_vn_rename+0xd5/0x140 [xfs]
+[ 517.379740] vfs_rename+0x1bc/0x950
+[ 517.380146] ? lookup_dcache+0x18/0x60
+[ 517.380572] ? do_renameat2+0x343/0x4d0
+[ 517.381013] do_renameat2+0x343/0x4d0
+[ 517.381672] __x64_sys_renameat2+0x25/0x30
+[ 517.382145] do_syscall_64+0x31/0x40
+[ 517.382554] entry_SYSCALL_64_after_hwframe+0x44/0xa9
+[ 517.383330] RIP: 0033:0x7fb9be244083
+[ 517.384005] Code: 64 89 02 b8 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 f3 0f 1e fa 49 89 ca 45 85 c0 74 44 b8 3c 01 00 00 0f 05 <48> 3d 00 f0 ff ff 77 3d 41 89 c0 83 f8 ff 74 0d 44 89 c0 c3 66 0f
+[ 517.387257] RSP: 002b:00007ffc56416ed8 EFLAGS: 00000202 ORIG_RAX: 000000000000013c
+[ 517.388148] RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007fb9be244083
+[ 517.389183] RDX: 00000000ffffff9c RSI: 00007ffc5641968c RDI: 00000000ffffff9c
+[ 517.390190] RBP: 0000000000000000 R08: 0000000000000004 R09: 00007ffc56416fd8
+[ 517.391440] R10: 00007ffc5641969c R11: 0000000000000202 R12: 000056494b1d6220
+[ 517.392747] R13: 00007ffc56416fd0 R14: 0000000000000000 R15: 0000000000000000
+[ 517.831548] XFS (sda): Unmounting Filesystem
+[ 518.026539] XFS (sda): Mounting V5 Filesystem
+[ 518.158574] XFS (sda): Ending clean mount
+[ 518.160484] xfs filesystem being mounted at /mnt supports timestamps until 2038 (0x7fffffff)
Dunno what this is about, but I'll have a look in the morning...
--D
next prev parent reply other threads:[~2020-08-20 2:46 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-07 13:57 [RFC PATCH 0/2] xfs: more unlinked inode list optimization v1 Gao Xiang
2020-07-07 13:57 ` [RFC PATCH 1/2] xfs: arrange all unlinked inodes into one list Gao Xiang
2020-07-08 22:33 ` Dave Chinner
2020-07-09 0:17 ` Gao Xiang
2020-07-07 13:57 ` [RFC PATCH 2/2] xfs: don't access AGI on unlinked inodes if it can Gao Xiang
2020-07-08 17:03 ` Darrick J. Wong
2020-07-08 23:40 ` Gao Xiang
2020-07-08 23:33 ` Dave Chinner
2020-07-09 0:55 ` Gao Xiang
2020-07-09 2:32 ` Dave Chinner
2020-07-09 10:36 ` Gao Xiang
2020-07-09 10:47 ` Gao Xiang
2020-07-09 22:36 ` Dave Chinner
2020-07-24 6:12 ` [RFC PATCH v2 0/3] xfs: more unlinked inode list optimization v2 Gao Xiang
2020-07-24 6:12 ` [RFC PATCH v2 1/3] xfs: arrange all unlinked inodes into one list Gao Xiang
2020-07-24 6:12 ` [RFC PATCH v2 2/3] xfs: introduce perag iunlink lock Gao Xiang
2020-07-24 6:12 ` [RFC PATCH v2 3/3] xfs: insert unlinked inodes from tail Gao Xiang
2020-08-18 13:30 ` [RFC PATCH v4 0/3] xfs: more unlinked inode list optimization v4 Gao Xiang
2020-08-18 13:30 ` [RFC PATCH v4 1/3] xfs: get rid of unused pagi_unlinked_hash Gao Xiang
2020-08-19 0:54 ` Darrick J. Wong
2020-08-21 1:09 ` Dave Chinner
2020-08-18 13:30 ` [RFC PATCH v4 2/3] xfs: introduce perag iunlink lock Gao Xiang
2020-08-19 1:06 ` Darrick J. Wong
2020-08-19 1:23 ` Gao Xiang
2020-08-18 13:30 ` [RFC PATCH v4 3/3] xfs: insert unlinked inodes from tail Gao Xiang
2020-08-19 0:53 ` [RFC PATCH v4 0/3] xfs: more unlinked inode list optimization v4 Darrick J. Wong
2020-08-19 1:14 ` Gao Xiang
2020-08-20 2:46 ` Darrick J. Wong [this message]
2020-08-20 4:01 ` Gao Xiang
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=20200820024618.GG6096@magnolia \
--to=darrick.wong@oracle.com \
--cc=bfoster@redhat.com \
--cc=david@fromorbit.com \
--cc=hsiangkao@redhat.com \
--cc=linux-xfs@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).