Date: Sat, 28 Nov 2015 08:29:55 -0500 (EST) From: Rick Macklem <rmacklem@uoguelph.ca> To: FreeBSD FS <freebsd-fs@freebsd.org> Subject: should mutexes be uniquely named? Message-ID: <2132881382.109600978.1448717395325.JavaMail.zimbra@uoguelph.ca>
next in thread | raw e-mail | index | archive | help
Hi,
I think the patches I posted last week that add "-manage-gids" are about
ready for a commit to head.
However, there is one place in the code where I'm not sure which is better
to do:
--> The code replaces a single mutex with one for each hash list head (table
    entry).
    I currently use MTX_DUPOK and call them all the same thing.
or
    I could add a "lockname" field to the hash table enty structure and give
    each one a unique name (similar to what Garrett Wollman did in the kernel rpc).
    The only downside to this is 16bytes of storage for each hash table entry.
    (Admittedly, I don't think many sites would need to set the hash table size
     greater than a few thousand, so this isn't a lot of malloc()'d memory.)
So, what do you think. Should I add the code to make the mutex names unique?
Thanks in advance for any comments, rick
ps: The coding change is trivial. It just involves using more malloc()'d memory.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2132881382.109600978.1448717395325.JavaMail.zimbra>
