https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71744
--- Comment #21 from torvald at gcc dot gnu.org --- (In reply to Jakub Jelinek from comment #17) > (In reply to torvald from comment #15) > > > Similarly, the 64 recursive locks in libc, again, significant amount of > > > memory > > > per process that doesn't care about exceptions, > > > > That might be reducable if we build custom locks and don't use pthread ones, > > but we'll at least have 64b per lock. > > Right now the lock is I think 40 bytes per lock, which is 64 * 40 bytes per > process. That is just too much (but of course the 64x locking a recursive > lock is even worse). Remembering more of the discussion we had about this in the past, then even with the improved rwlock, Gleb reports that there is a slowdown in Gleb's tests because of cache contention -- which would mean that we may have to use one cacheline per lock.