This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v3] Don't fall back to mmap if there are still locked non-avoided arenas to try.
- From: Florian Weimer <fweimer at redhat dot com>
- To: "Carlos O'Donell" <carlos at redhat dot com>, Siddhesh Poyarekar <siddhesh at redhat dot com>, libc-alpha at sourceware dot org, Josef Bacik <josef at toxicpanda dot com>, Mike Frysinger <vapier at gentoo dot org>
- Date: Thu, 15 Oct 2015 15:47:22 +0200
- Subject: Re: [PATCH v3] Don't fall back to mmap if there are still locked non-avoided arenas to try.
- Authentication-results: sourceware.org; auth=none
- References: <1439974941-6577-1-git-send-email-siddhesh at redhat dot com> <20150819135029 dot GC1584 at vapier> <20150819172549 dot GN2415 at spoyarek dot pnq dot redhat dot com> <55F1F212 dot 1040101 at redhat dot com>
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