On 03.07.2014 11:31, Jorgen Lundman wrote:
> Apple made the mutex type in Darwin be of opaque type, so we have to call
> the API to allocate a new mutex. We then discovered that our total active
> number of mutex allocations are ever increasing.
> 
> I wrote a framework around the SPL mutex API and dump the leaked nodes
> after module unload, and found a few places to fix up. I have noticed that
> some of these mutex_destroy calls are also missing in ZOL and FreeBSD. I
> did not check IllumOS (sorry).
> 
> Of course, on most ZFS platforms, the mutex "data" are housed inside
> various structures and get freed automatically. (Making mutex_destroy
> somewhat optional) but perhaps upstream are still interested in this patch,
> in the name of code "correctness".
> 
> https://github.com/openzfsonosx/zfs/commit/2e30c792597a

On production FreeBSD locks themselves are probably not leaking if not
destroyed.  But when kernel built with debugging -- it may cause both
leaks and assertion panics.  So yea, it is better to destroy them. :)

-- 
Alexander Motin
_______________________________________________
developer mailing list
[email protected]
http://lists.open-zfs.org/mailman/listinfo/developer

Reply via email to