spinlock contention in ext4_getattr()
Issue
- spinlock contention in ext4_getattr()
- If
ls
is issued from multiple vsftpd daemon processes on a directory with a large number of files in it (like 80,000) they all contend on the i_block_reservation_lock spin lock as they all attempt to get details of the files in the directory. This effectively single threads all of the processes and produces a high contention rate on each inodes spinlock in series.
perf result
80.07% vsftpd [kernel.kallsyms] [k] _spin_lock <==
5.03% vsftpd ^E [.] 0x0000000000089745
1.06% vsftpd [kernel.kallsyms] [k] _atomic_dec_and_lock
1.00% :15904 [kernel.kallsyms] [k] _spin_lock
1.00% :15918 [kernel.kallsyms] [k] _spin_lock
Environment
- Red Hat Enterprise Linux 6
- kernel before kernel-2.6.32-642.4.2.el6
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.