On Mon, 2007-02-26 at 11:01 -0800, Nishanth Aravamudan wrote: > Add a few fields to the seg_info structure to store the starting address > and size of the extracopy area. This cleans up the code so we can call > extracopy earlier in the process and not pass around as many pointers. > It also is necessary for the patch to drop pagecache pages. If the > extra_vaddr field is NULL, then the pagecache dropping code assumes this > means there was no extracopy area. This method uses the start address > and size to represent the extracopy area (as opposed to start and end > pointers). > > Currently the elf executable header pointer is global in elflink.c, but > passed as a parameter to parse_phdrs(). The only other user of ehdr is > the extracopy code. We run this code at prepare-time, but there is no > reason it couldn't be done at parse-time. Since we store away the > extracopy information anyways, now, this is ok. It does require moving > the parse_phdrs() function (the majority of this patch) to avoid foward > declarations. The only performance implication of this, that I can see, > is that we now will call get_extracopy() unconditionally, whereas before > we would not do prepare (and thus not extracopy) for shared segments. > Since get_extracopy() only does parsing, though, I think this should be > ok (extra work may be done in DEBUG=yes mode, but that's not > performance-critical). parse_phdrs() now does much more than just deal > with the program headers. Rename the function to indicate that it > abstracts all ELF-related parsing. Finally, rename the seg_info member > phdr to index to indicate it indexes into the program header and is not > the program header itself. With the new extracopy parameter, this helps > clarify some code. > > Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]> Acked-by: Adam Litke <[EMAIL PROTECTED]> -- Adam Litke - (agl at us.ibm.com) IBM Linux Technology Center
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Libhugetlbfs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel
