Date: Thu, 25 Sep 2008 19:00:04 -0400 From: Jeff Wheelhouse <freebsd-hackers@wheelhouse.org> To: John Baldwin <jhb@freebsd.org> Cc: freebsd-hackers@freebsd.org Subject: Re: Major SMP problems with lstat/namei Message-ID: <C70E3C36-3558-4951-A6F7-A072BCEE374F@wheelhouse.org> In-Reply-To: <200809241212.09920.jhb@freebsd.org> References: <8185F68B-C443-4891-BEC2-5E3D453DDC93@wheelhouse.org> <200809241212.09920.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sep 24, 2008, at 12:12 PM, John Baldwin wrote: > Shared lookups only work on the NFS client in 6.x. I'm about to > turn them on > for UFS in HEAD (8.x) and will backport the needed fixes to 7.x > after 7.1 > (too risky to merge to 7.x this close to a release). OK, given all the patches you referenced, I did make a decent effort at backporting to 7.0. Here are the results: > Revision Changes Path > 1.87 +48 -29 src/sys/ufs/ufs/ufs_lookup.c Applied, changing a couple of VOP_ISLOCKED() and vn_lock() calls to add "td" as the last parameter. > Revision Changes Path > 1.53 +0 -1 src/sys/ufs/ufs/inode.h > 1.88 +10 -13 src/sys/ufs/ufs/ufs_lookup.c Applied successfully. > SVN rev 181018 on 2008-07-30 21:07:56Z by jhb NOT applied, because it was a whitespace tweak on ufs_lookup 1.89 which was not on your list. > SVN rev 183079 on 2008-09-16 16:18:36Z by jhb Applied cleanly. > Modified files: > sys/ufs/ufs inode.h ufs_lookup.c > Log: > SVN rev 183093 on 2008-09-16 19:06:44Z by jhb Applied cleanly. > 1.6 +2 -1 src/sys/ufs/ufs/dirhash.h > 1.24 +289 -227 src/sys/ufs/ufs/ufs_dirhash.c This patch applies but generates an awful lot of errors (enclosed at end). I think it may be dependent on the 8.0 lockmgr. Since most of the remaining patches are against the same files, I bailed out here. > SVN rev 183080 on 2008-09-16 16:23:56Z by jhb Skipped. > SVN rev 183280 on 2008-09-22 20:53:22Z by jhb Skipped. > There are additional fixes needed to fix races with umount -f, > so if you backport all this stuff, don't use umount -f or you > risk panics. :) Noted. > - mp->mnt_kern_flag |= MNTK_MPSAFE; > + mp->mnt_kern_flag |= MNTK_MPSAFE | MNTK_LOOKUP_SHARED; Applied. If I can make the backport work (a big if, given the dirhash changes) on 7.0, I am happy to maintain and test the diffs locally until after the 7.1 release and send them over to you at that time, if it will save you some effort. Thanks, Jeff Dirhash compile errors: /usr/src/sys/ufs/ufs/ufs_dirhash.c:132:37: error: macro "lockmgr" requires 4 arguments, but only 3 given /usr/src/sys/ufs/ufs/ufs_dirhash.c: In function 'ufsdirhash_release': /usr/src/sys/ufs/ufs/ufs_dirhash.c:132: error: 'lockmgr' undeclared (first use in this function) /usr/src/sys/ufs/ufs/ufs_dirhash.c:132: error: (Each undeclared identifier is reported only once /usr/src/sys/ufs/ufs/ufs_dirhash.c:132: error: for each function it appears in.) /usr/src/sys/ufs/ufs/ufs_dirhash.c:161:45: error: macro "lockmgr" requires 4 arguments, but only 3 given /usr/src/sys/ufs/ufs/ufs_dirhash.c: In function 'ufsdirhash_create': /usr/src/sys/ufs/ufs/ufs_dirhash.c:161: error: 'lockmgr' undeclared (first use in this function) /usr/src/sys/ufs/ufs/ufs_dirhash.c:178:17: error: macro "lockmgr" requires 4 arguments, but only 3 given /usr/src/sys/ufs/ufs/ufs_dirhash.c:193:60: error: macro "lockmgr" requires 4 arguments, but only 3 given /usr/src/sys/ufs/ufs/ufs_dirhash.c:198:42: error: macro "lockmgr" requires 4 arguments, but only 3 given /usr/src/sys/ufs/ufs/ufs_dirhash.c:222:39: error: macro "lockmgr" requires 4 arguments, but only 3 given /usr/src/sys/ufs/ufs/ufs_dirhash.c: In function 'ufsdirhash_acquire': /usr/src/sys/ufs/ufs/ufs_dirhash.c:222: error: 'lockmgr' undeclared (first use in this function) /usr/src/sys/ufs/ufs/ufs_dirhash.c:248:17: error: macro "lockmgr" requires 4 arguments, but only 3 given /usr/src/sys/ufs/ufs/ufs_dirhash.c: In function 'ufsdirhash_free': /usr/src/sys/ufs/ufs/ufs_dirhash.c:247: error: 'lockmgr' undeclared (first use in this function) /usr/src/sys/ufs/ufs/ufs_dirhash.c:385:39: error: macro "lockmgr" requires 4 arguments, but only 3 given /usr/src/sys/ufs/ufs/ufs_dirhash.c: In function 'ufsdirhash_build': /usr/src/sys/ufs/ufs/ufs_dirhash.c:385: error: 'lockmgr' undeclared (first use in this function) cc1: warnings being treated as errors /usr/src/sys/ufs/ufs/ufs_dirhash.c: In function 'ufsdirhash_free_locked': /usr/src/sys/ufs/ufs/ufs_dirhash.c:403: warning: implicit declaration of function 'lockmgr_assert' /usr/src/sys/ufs/ufs/ufs_dirhash.c:403: warning: nested extern declaration of 'lockmgr_assert' /usr/src/sys/ufs/ufs/ufs_dirhash.c:403: error: 'KA_LOCKED' undeclared (first use in this function) /usr/src/sys/ufs/ufs/ufs_dirhash.c:417:37: error: macro "lockmgr" requires 4 arguments, but only 3 given /usr/src/sys/ufs/ufs/ufs_dirhash.c:417: error: 'lockmgr' undeclared (first use in this function) /usr/src/sys/ufs/ufs/ufs_dirhash.c:418:35: error: macro "lockmgr" requires 4 arguments, but only 3 given /usr/src/sys/ufs/ufs/ufs_dirhash.c:438:37: error: macro "lockmgr" requires 4 arguments, but only 3 given /usr/src/sys/ufs/ufs/ufs_dirhash.c: In function 'ufsdirhash_lookup': /usr/src/sys/ufs/ufs/ufs_dirhash.c:473: error: 'KA_LOCKED' undeclared (first use in this function) /usr/src/sys/ufs/ufs/ufs_dirhash.c: In function 'ufsdirhash_findfree': /usr/src/sys/ufs/ufs/ufs_dirhash.c:621: error: 'KA_LOCKED' undeclared (first use in this function) /usr/src/sys/ufs/ufs/ufs_dirhash.c: In function 'ufsdirhash_enduseful': /usr/src/sys/ufs/ufs/ufs_dirhash.c:692: error: 'KA_LOCKED' undeclared (first use in this function) /usr/src/sys/ufs/ufs/ufs_dirhash.c: In function 'ufsdirhash_findslot': /usr/src/sys/ufs/ufs/ufs_dirhash.c:1001: error: 'KA_LOCKED' undeclared (first use in this function) /usr/src/sys/ufs/ufs/ufs_dirhash.c: In function 'ufsdirhash_delslot': /usr/src/sys/ufs/ufs/ufs_dirhash.c:1025: error: 'KA_LOCKED' undeclared (first use in this function) /usr/src/sys/ufs/ufs/ufs_dirhash.c:1101:59: error: macro "lockmgr" requires 4 arguments, but only 3 given /usr/src/sys/ufs/ufs/ufs_dirhash.c: In function 'ufsdirhash_recycle': /usr/src/sys/ufs/ufs/ufs_dirhash.c:1101: error: 'lockmgr' undeclared (first use in this function)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C70E3C36-3558-4951-A6F7-A072BCEE374F>