This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v4] Make bindresvport() function to multithread-safe
- From: Torvald Riegel <triegel at redhat dot com>
- To: "Carlos O'Donell" <carlos at systemhalted dot org>
- Cc: Roland McGrath <roland at hack dot frob dot com>, Peng Haitao <penght at cn dot fujitsu dot com>, Pedro Alves <palves at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>, Andreas Jaeger <aj at suse dot com>
- Date: Mon, 01 Oct 2012 11:41:01 +0200
- Subject: Re: [PATCH v4] Make bindresvport() function to multithread-safe
- References: <1348823725-18793-1-git-send-email-penght@cn.fujitsu.com> <CAE2sS1hJLkePJXMw8wCXQ48einUnvjPSbjX11LMzCVvT3i3zZg@mail.gmail.com> <5065B74C.8090704@redhat.com> <5065B818.2020908@systemhalted.org> <5065C207.2020709@redhat.com> <CAE2sS1jK77AOr9dUP+1ri_aNxHQxajruxOTF3yydZ7hOJ2wW4A@mail.gmail.com> <5065C886.6020909@redhat.com> <CAE2sS1jL=3PgZJogO1rvL5LQBgt37RWEcYs9hQ-MRSak3JZN1w@mail.gmail.com> <20120928162506.8A2572C074@topped-with-meat.com> <CAE2sS1hkkUBxssFOGc0oghKLc+Syc6KG8-T9o8TOEwaL9dGjoA@mail.gmail.com> <20120928163408.874942C091@topped-with-meat.com> <CAE2sS1iwLkNYRVu8S+shHNdvaX-mND6zYQxtipkXnxTk4OK8bw@mail.gmail.com>
On Fri, 2012-09-28 at 13:01 -0400, Carlos O'Donell wrote:
> Peng,
>
> There are really three things every high quality patch needs:
>
> (a) Rationale for the change.
>
> (b) Performance analysis e.g. How does the patch effect the
> performance of the function?
Peng, I've seen that you've been using perf already to get the
performance numbers. What about comparing cache-misses too? Perhaps
that could explain why you're seeing improvements when you make things
thread-safe by separating state for different threads.
Also, if possible, I think it's often better to make a hypothesis why
performance would change this or that way due to a patch, and then try
to validate this hypothesis with measurements. If you just look at
coarse numbers for a certain test case, it might be true that the patch
makes the particular test case on your particular test machine faster,
but then you don't know why; it could be the case that this is just an
outlier, and the patch isn't improving performance in general.
Torvald