Nishanth Aravamudan wrote:
> commit 7ad414f76f03f26fd148bf4100a83e238ac7af72
> Author: Nishanth Aravamudan <[EMAIL PROTECTED]>
> Date: Fri Feb 2 15:08:34 2007 -0800
>
> elflink: store extracopy information
>
> Add a few fields to the seg_info structure to store the starting address
> and size of the extracopy area for use by the next patch to drop
> pagecache pages. If the extra_start field is NULL, then the pagecache
> dropping code assumes this means there was no extracopy area. This
> version stores the beginning and ending addresses of the extracopy area.
>
> Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]>
>
> diff --git a/elflink.c b/elflink.c
> index 5a57358..dad3ea7 100644
> --- a/elflink.c
> +++ b/elflink.c
> @@ -186,7 +186,7 @@ static char share_path[PATH_MAX+1];
> #define MAX_HTLB_SEGS 2
>
> struct seg_info {
> - void *vaddr;
> + void *vaddr, *extra_start, *extra_end;
> unsigned long filesz, memsz;
> int prot;
> int fd;
> @@ -497,8 +497,7 @@ static inline int keep_symbol(Elf_Sym *s, void *start,
> void *end)
> * include these initialized variables in our copy.
> */
>
> -static void get_extracopy(struct seg_info *seg, void **extra_start,
> - void **extra_end)
> +static void get_extracopy(struct seg_info *seg)
> {
> Elf_Dyn *dyntab; /* dynamic segment table */
> Elf_Sym *symtab = NULL; /* dynamic symbol table */
> @@ -557,21 +556,21 @@ static void get_extracopy(struct seg_info *seg, void
> **extra_start,
>
> if (found_sym) {
> /* Return the copy window */
> - *extra_start = start;
> - *extra_end = end;
> + seg->extra_start = start;
> + seg->extra_end = end;
> return;
> } else {
> /* No need to copy anything */
> - *extra_start = start_orig;
> - *extra_end = start_orig;
> + seg->extra_start = start_orig;
> + seg->extra_end = start_orig;
> goto bail3;
>
I realize this isn't part of your changes, but I am new here. Is it
useful to have 'goto bail3' go to a return instead of just having the
return here?
> }
>
> bail:
> DEBUG("Unable to perform minimal copy\n");
> bail2:
> - *extra_start = start_orig;
> - *extra_end = end_orig;
> + seg->extra_start = start_orig;
> + seg->extra_end = end_orig;
> bail3:
> return;
> }
>
...
Jon
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Libhugetlbfs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel