From owner-freebsd-fs Thu Aug 6 10:12:36 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA10565 for freebsd-fs-outgoing; Thu, 6 Aug 1998 10:12:36 -0700 (PDT) (envelope-from owner-freebsd-fs@FreeBSD.ORG) Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA10533 for ; Thu, 6 Aug 1998 10:12:21 -0700 (PDT) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.8.8/8.8.8) id NAA14470; Thu, 6 Aug 1998 13:12:03 -0400 (EDT) (envelope-from wollman) Date: Thu, 6 Aug 1998 13:12:03 -0400 (EDT) From: Garrett Wollman Message-Id: <199808061712.NAA14470@khavrinen.lcs.mit.edu> To: freebsd-fs@FreeBSD.ORG Cc: dillon@backplane.com Subject: Filesystem locking during lookups Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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. -GAWollman -- Garrett A. Wollman | O Siem / We are all family / O Siem / We're all the same wollman@lcs.mit.edu | O Siem / The fires of freedom Opinions not those of| Dance in the burning flame MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message