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: [PATCH][RFC] Allow explicit shrinking of arena heaps using anenvironment variable


On Mon, 13 Aug 2012 02:32:36 -0400, KOSAKI wrote:
> If I understand correctly, this patch revert following commit. So, I
> suggest to confirm the reason why Jakub introduced it. I'm afraid he
> intended to improve multi threaded performance instead of single.
> (Again, MADV_DONTNEED has good multi thread performance than
> PROT_NONE.)

Thanks, I didn't think of checking when the change got introduced. I
don't think performance matters here though, since dropping pages with
MADV_DONTNEED doesn't make any difference to the commit charge.

In any case, I'll test with a multi-threaded program anyway to get some
more numbers for the performance improvement with MADV_DONTNEED if
necessary so that we have a sense of what we're losing. In fact, I
think I'll do a performance comparison of malloc in a multi-threaded
with and without the patch.

If the performance improvement is significant, maybe it would be a good
idea to do a one-time check on linux during malloc initialization to
check if overcommit is heuristic/blind or accounted? For
overcommit_memory = 0 and 1, we can continue using madvise and disable
it for 2.

Regards,
Siddhesh


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