This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: ping: [patch] malloc per-thread cache ready for review
- From: Will Newton <will dot newton at gmail dot com>
- To: DJ Delorie <dj at redhat dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 2 Mar 2017 10:49:52 +0000
- Subject: Re: ping: [patch] malloc per-thread cache ready for review
- Authentication-results: sourceware.org; auth=none
- References: <xn60ju5a2a.fsf@greed.delorie.com>
On Tue, Feb 28, 2017 at 8:34 PM, DJ Delorie <dj@redhat.com> wrote:
Hi,
> original post: https://www.sourceware.org/ml/libc-alpha/2017-01/msg00524.html
>
> most recent update: https://www.sourceware.org/ml/libc-alpha/2017-02/msg00004.html
This code is quite tricky to review because it is presented as a
branch which contains merges from master and many cumulative changes.
As such it basically involves diffing the the head of the branch
against the last merge from master and reviewing that diff rather than
reviewing a sequence of self-contained patches. It's also trickier to
do on-mailing list review against a git repo.
- There are some inconsistencies with whitespace around operators.
- MAYBE_INIT_TCACHE could be defined to be empty when !USE_TCACHE,
this would reduce #ifdefs
- There's a bunch of repeated code of the form:
TCacheEntry *e = (TCacheEntry *) chunk2mem (tc_victim);
e->next = tcache->entries[tc_idx];
tcache->entries[tc_idx] = e;
++(tcache->counts[tc_idx]);
and
TCacheEntry *e = tcache->entries[tc_idx];
tcache->entries[tc_idx] = e->next;
--(tcache->counts[tc_idx]);
Which makes me wonder if it might be neater as defines or inline functions.
Is there a reasonably straightforward way to reproduce (a subset of)
the benchmark results you referenced?
Thanks,