This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Small tcache improvements
- From: DJ Delorie <dj at redhat dot com>
- To: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- Cc: libc-alpha at sourceware dot org, nd at arm dot com
- Date: Thu, 16 May 2019 17:20:13 -0400
- Subject: Re: [PATCH] Small tcache improvements
> OK for commit?
LGTM.
Reviewed-by: DJ Delorie <dj@redhat.com>
Wilco Dijkstra <Wilco.Dijkstra@arm.com> writes:
> +
> +/* Maximum chunks in tcache bins for tunables. This value must fit the range
> + of tcache->counts[] entries, else they may overflow. */
> +# define MAX_TCACHE_COUNT UINT16_MAX
Ok.
> - char counts[TCACHE_MAX_BINS];
> + uint16_t counts[TCACHE_MAX_BINS];
Ok.
> -#define MAX_TCACHE_COUNT 127 /* Maximum value of counts[] entries. */
> -
Ok.
> - assert (tc_idx < TCACHE_MAX_BINS);
Ok since ever call to tcache_put checks the idx already
> - assert (tcache->counts[tc_idx] > 0);
ok since made redundant by nex change...
> - /*&& tc_idx < TCACHE_MAX_BINS*/ /* to appease gcc */
> && tcache
> - && tcache->entries[tc_idx] != NULL)
> + && tcache->counts[tc_idx] > 0)
Ok.
> -The upper limit is 127. If set to zero, the per-thread cache is effectively
> +The upper limit is 65535. If set to zero, the per-thread cache is effectively
Ok.