Date: Thu, 6 Aug 1998 21:50:34 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: wollman@khavrinen.lcs.mit.edu (Garrett Wollman) Cc: freebsd-fs@FreeBSD.ORG, dillon@backplane.com Subject: Re: Filesystem locking during lookups Message-ID: <199808062150.OAA25238@usr07.primenet.com> In-Reply-To: <199808061712.NAA14470@khavrinen.lcs.mit.edu> from "Garrett Wollman" at Aug 6, 98 01:12:03 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> I ran a modified kernel whose lookup() only uses exclusive locks for > CREATE and DELETE namei operations yesterday. So far as I can tell, > this is a perfectly reasonable thing to do. However, it does > seriously unbalance the relative priorities of lookups vis-a-vis > deletes, and this might be considered a security issue. A more > complete implementation would use shared locks all the time, and then > upgrade to exclusive only when actually necessary. > > One particular side-effect of this change is that my five-minute > dexpire took an hour and a half yesterday noon. I believe this > effectively rebuts Matt Dillon's contention that the vfs name cache > will prevent problems of lock contention. (And indeed, if one > inspects the code, it is clear that the vnode has to locked first, > since the name cache is called by VOP_LOOKUP, which requires a locked > vnode.) > > In 30 seconds, my machine made 1475 calls to namei, of which 209 were > root-relative. Even with these changes, my machine still deadlocked > last night (although it lasted longer than it did the night before), > so I would say that there is a fair amount of filesystem contention > going on. Are you running soft updates? I have a *very* hard time believing that the lock is being held all the way up to root, intentionally. There's simply no code to actually reverse traverse freeing the locks. Perhaps locked vnodes are being cached with the lock held in some way? Is your news spool mounted right off of root? I'm also very interested in your root vs. relative path count; can you say what the single largest culprit for this is? Is there a single largest culprit responsible for absolute path lookup? Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808062150.OAA25238>