This is the mail archive of the libc-alpha@sourceware.org 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: [PATCH v3] Don't fall back to mmap if there are still locked non-avoided arenas to try.


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


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