This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC/PoC] malloc: use wfcqueue to speed up remote frees

On 07/31/2018 04:49 AM, Eric Wong wrote:
> The goal is to reduce contention and improve locality of cross-thread
> malloc/free traffic common to IPC systems (including Userspace-RCU) and
> some garbage-collected runtimes.

This looks like a really interesting contribution!

For anyone reviewing this patch I just want to point out that Eric *does*
have FSF copyright assignment for glibc, so review can proceed normally
for this patch. Thank you!

I would like to see urcu used within glibc to provide better data structures
for key thread, dynamic loader, and malloc algorithms. So if anything I think
this is a move in the right direction.

It would be interesting to roll your RFC into Fedora Rawhide for 6 months and
see if we hit any problems.

I have a few high-level questions:

- Can you explain the RSS reduction given this patch? You might think that just
  adding the frees to a queue wouldn't result in any RSS gains. However, you
  are calling _int_free a lot in row and that deinterleaving may help (you really
  want vector free API here so you don't walk all the lists so many times, tcache
  had the same problem but in reverse for finding chunks). 

- Adding urcu as a build-time dependency is not acceptable for bootstrap, instead
  we would bundle a copy of urcu and keep it in sync with upstream. Would that
  make your work easier?

- What problems are you having with `make -j4 check?' Try master and report back.
  We are about to release 2.28 so it should build and pass.

Thank you again for testing this out.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]