public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* shrink_dcache_sb scalability problem.
@ 2006-04-13  8:22 David Chinner
  2006-04-13  8:52 ` Andrew Morton
  0 siblings, 1 reply; 9+ messages in thread
From: David Chinner @ 2006-04-13  8:22 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-fsdevel

Folks,

After recently upgrading a build machine to 2.6.16, we started
seeing 10-50s pauses where the machine would appear to hang.
Profiles showed that we were spending a substantial amount of time
in shrink_dcache_sb, and several CPUs were spinning on the
dcache_lock.

This is happening quite frequently - we recorded a 10 minute period
where there were 13 incidents where a touch/rm of a single file was
taking longer than 10s. The machine was close to unusable when this
happened.

At the time of the problem the machine had several million unused
cached dentries in memory (often > 10million), and the builds use
chroot environments with internally mounted filesystems like /proc
and /sys.

The problem is that whenever we mount /proc, /sys, /dev/pts, etc, we
call shrink_dcache_sb() which does multiple traversals across the
unused dentry list with the dcache_lock held.

It is trivial to reduce this to one traversal for the case of a new
mount. However, that doesn't solve the issue that we are walking a
linked list of many million entries with a global lock held and
holding out everyone else.

We're open to any suggestions on how to go about fixing this problem
as it's not obvious what the correct way to approach this problem
is. Any advice, patches, etc is more than welcome.

Cheers,

Dave.
-- 
Dave Chinner
R&D Software Enginner
SGI Australian Software Group

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-04-18 14:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-13  8:22 shrink_dcache_sb scalability problem David Chinner
2006-04-13  8:52 ` Andrew Morton
2006-04-14  3:43   ` David Chinner
2006-04-14  5:23     ` Andrew Morton
2006-04-15  5:25       ` Bharata B Rao
2006-04-15  5:53         ` Andrew Morton
2006-04-18  5:57           ` Bharata B Rao
2006-04-18  0:29       ` David Chinner
2006-04-18 14:37         ` [RFC][PATCH] " David Chinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox