Agustina Arzille, on Thu 28 Apr 2016 23:16:31 -0300, wrote:
> >You mean the lock protecting __pthread_threads?  That's only used on
> >thread creation and pthread_self calls, which are really not that often,
> >actually, so that's not really the problem.
> 
> It's more than that. For each pthread_t type, we need the thread descriptor
> structure, and in order to fetch that, a global rwlock must be acquired. That
> is a totally unnecessary performance hit (That also wastes memory).

Yes, but I mean it's not that often that we fetch pthread_t, is it?

> - Modify errno script to generate error codes for robust locks

That should already happen automatically.  If not it's the gnumach
header which needs to be fixed.

> Patch 1: Add gsync-based locks to glibc
> 
> Patch 2: Basic pthread objects
> 
> Patch 3: Semaphores and rwlocks

Can be separate :)

I'd go with rwlocks first, they are used quite a bit in translators,
semaphores are much less used :) (and postgresql can wait).

> What do you guys think?

Looks like a good plan :)

Thanks!
Samuel

Reply via email to