PTHREAD_MUTEX_ROBUST for tdb?

Volker Lendecke Volker.Lendecke at SerNet.DE
Wed May 18 01:52:35 MDT 2011


On Wed, May 18, 2011 at 10:17:15AM +0930, Rusty Russell wrote:
> As I just replied on a private variant of this:
> 
> Yes.  It's not very portable, but it is in recent Linux and glibcs.
> 
> As far as I can tell, embedding a pthread mutex into a memory mapped
> file is going to be a bit of a nightmare :(  Its size is not necessarily
> stable over glibc changes, for example.

So a strict requirement is to run with completely different
glibc implementations on a single host against the same tdb
file? True, this will kill it. Probably shared robust
mutexes are just a broken concept then. Sorry for the noise.

> We could use the robust futex support and open-code it for Linux
> ourselves, at least for x86 which we care about.  This would be a fun
> project, but a non-trivial one.

How does this fit with a distant future goal of making tdb
threadsafe? The way I understood the set_robust_list call is
that there is one robust list per thread, and glibc when
doing threads would overwrite the list maintained by tdb. Am
I wrong here?

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen


More information about the samba-technical mailing list