From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14354 invoked by alias); 6 Apr 2010 20:55:26 -0000 Received: (qmail 12555 invoked by uid 48); 6 Apr 2010 20:55:00 -0000 Date: Tue, 06 Apr 2010 20:55:00 -0000 Message-ID: <20100406205500.12553.qmail@sourceware.org> From: "drepper at redhat dot com" To: glibc-bugs@sources.redhat.com In-Reply-To: <20100325143324.11431.fche@redhat.com> References: <20100325143324.11431.fche@redhat.com> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug libc/11431] consider madvise for ld.so X-Bugzilla-Reason: CC Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2010-04/txt/msg00052.txt.bz2 ------- Additional Comments From drepper at redhat dot com 2010-04-06 20:54 ------- (In reply to comment #2) > Can you suggest some statistics we can gather in order to inform > heuristics within ld.so to trigger a madvise(MADV_WILLNEED) > (which itself is a heuristic for the kernel)? I don't think heuristics will work in ld.so. It's pretty much an all or nothing selection. For each use the madvise call is useful or not. This should be a setting in a file, perhaps it can be changed after the file has been created (similar to the execstack setting). Perhaps ELF flags (e_flags). Otherwise an entry in the program header. Where heuristics may come in is in monitoring the system (using systemtap or so) and look at the DSO use in apps. I.e., when the app ends look how many pages of the DSO have been used over the lifetime of the app. If a certain threshold is reached the flag could be set. Another piece of information would be how much of each segment (text, data) is used. This could then help lowering the threshold for using the flag if the commonly used code/data is first in the segment. This would then not be a simple flag but instead each PT_LOAD entry in the program header could have a corresponding PT_READAHEAD entry or so. By default it could be of zero size and using profiling tools the ideal size can be determined. -- http://sourceware.org/bugzilla/show_bug.cgi?id=11431 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.