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: ping: [patch] malloc per-thread cache ready for review


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,


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