[PATCH v3] Don't fall back to mmap if there are still locked non-avoided arenas to try.

Florian Weimer fweimer@redhat.com
Thu Oct 15 13:47:00 GMT 2015


On 09/10/2015 11:11 PM, Carlos O'Donell wrote:
> The logic in reused_arena is still confused. For example we don't
> need a begin, since next_to_use is the start of our loop. Rather than
> correct this, I'm going to give you an alternate suggestion.

I think the begin variable was an attempt to deal with the concurrency
issue in this function.  Please keep it and use relaxed loads and stores
to access next_to_use.  I don't think it is necessary to change it with
a CAS because the variable is just a hint anyway.  The important point
is that every invocation of reused_arena terminates, and with the
current code, it's far from obvious that it does when the function is
called concurrently.

Florian



More information about the Libc-alpha mailing list