On (07/10/08 15:11), Adam Litke didst pronounce:
> On Fri, 2008-10-03 at 18:37 +0100, Andy Whitcroft wrote:
> > Rename and export the pool counter update interface.
> > 
> > Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]>
> 
> Ok.
> Acked-by: Adam Litke <[EMAIL PROTECTED]>
> 
> Mel does have a point about exported symbols, but I think there are
> plenty of other new symbols (get_huge_pages) that haven't got lds
> entries. 

Yeah it does

HTLBFS_2.0 {
        global:
                get_huge_pages;
                free_huge_pages;
};

> We probably want to fix it all up with one patch before
> releasing 2.1.
> 
> > ---
> >  hugetlbfs.h |    2 ++
> >  hugeutils.c |    8 ++++----
> >  2 files changed, 6 insertions(+), 4 deletions(-)
> > 
> > diff --git a/hugetlbfs.h b/hugetlbfs.h
> > index 54fa13b..985e138 100644
> > --- a/hugetlbfs.h
> > +++ b/hugetlbfs.h
> > @@ -71,6 +71,8 @@ enum {                     /* The number of pages of a 
> > given size that ... */
> >     HUGEPAGES_MAX_COUNTERS,
> >  };
> >  long get_huge_page_counter(long pagesize, unsigned int counter);
> > +int set_huge_page_counter(long pagesize, unsigned int counter,
> > +                                                   unsigned long val);
> >  int set_nr_hugepages(long pagesize, unsigned long val);
> >  int set_nr_overcommit_hugepages(long pagesize, unsigned long val);
> >  long read_meminfo(const char *tag);
> > diff --git a/hugeutils.c b/hugeutils.c
> > index 3eb9af6..da3afd5 100644
> > --- a/hugeutils.c
> > +++ b/hugeutils.c
> > @@ -189,7 +189,7 @@ static long file_read_ulong(char *file, const char *tag)
> >             p = buf;
> > 
> >     val = strtol(p, &q, 0);
> > -   if (! isspace(*q)) {
> > +   if (*q && ! isspace(*q)) {
> >             ERROR("Couldn't parse %s value\n", file);
> >             return -1;
> >     }
> > @@ -255,7 +255,7 @@ static int select_pool_counter(unsigned int counter, 
> > unsigned long pagesize,
> >     return 0;
> >  }
> > 
> > -static int set_pool_counter(long pagesize, unsigned int counter,
> > +int set_huge_page_counter(long pagesize, unsigned int counter,
> >                     unsigned long val)
> >  {
> >     char file[PATH_MAX+1];
> > @@ -776,12 +776,12 @@ long get_huge_page_counter(long pagesize, unsigned 
> > int counter)
> > 
> >  int set_nr_hugepages(long pagesize, unsigned long val)
> >  {
> > -   return set_pool_counter(pagesize, HUGEPAGES_TOTAL, val);
> > +   return set_huge_page_counter(pagesize, HUGEPAGES_TOTAL, val);
> >  }
> > 
> >  int set_nr_overcommit_hugepages(long pagesize, unsigned long val)
> >  {
> > -   return set_pool_counter(pagesize, HUGEPAGES_OC, val);
> > +   return set_huge_page_counter(pagesize, HUGEPAGES_OC, val);
> >  }
> > 
> >  /********************************************************************/
> -- 
> Adam Litke - (agl at us.ibm.com)
> IBM Linux Technology Center
> 

-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Libhugetlbfs-devel mailing list
Libhugetlbfs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel

Reply via email to