Date: Thu, 16 Aug 2007 10:56:31 -0400 From: John Baldwin <jhb@freebsd.org> To: freebsd-arch@freebsd.org Subject: Re: file locking. Message-ID: <200708161056.31494.jhb@freebsd.org> In-Reply-To: <20070815233852.X568@10.0.0.1> References: <20070815233852.X568@10.0.0.1>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 16 August 2007 03:01:18 am Jeff Roberson wrote: > I have been looking at file locking for 8.0 and have come up with a way to > completely eliminate the file lock, reduce the size of struct file by > ~4 pointers (22%), remove the global list of files and associated lock, > and restrict the scope of unp_gc while removing several race conditions. I like finit(). I would maybe change socketpair() to pass so1 and so2 to finit() rather than setting f_data twice. Did you consider using refcount_* for f_count rather than using the atomic operations directly? It appears you never call unp_discard() and thus 'closef()' on the sockets in unp_gc() now. Perhaps the fdrop()'s in the end of the loop should be unp_discard()'s instead? Also, it's a bit of a shame to lose 'show files' from ddb. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708161056.31494.jhb>