On Fri, Oct 10, 2008 at 12:29:47PM +0100, Mel Gorman wrote:
[...]
> > +   if (adjust_str[0] == '+' || adjust_str[0] == '-') {
> > +
> > +           /*
> > +            * XXX: reading HUGEPAGES_TOTAL gives you the total pages
> > +            * in use not what you wrote.
> > +            */
> > +           if (counter == HUGEPAGES_TOTAL)
> > +                   base = pools[pos].minimum;
> > +           else if (counter == HUGEPAGES_OC)
> > +                   base = pools[pos].maximum - pools[pos].minimum;
> > +           else
> > +                   base = get_huge_page_counter(page_size, counter);
> > +   } else {
> > +           if (counter == HUGEPAGES_OC)
> > +                   base = -pools[pos].minimum;
> > +   }
> > +   adjust += base;
> > +   set_huge_page_counter(page_size, counter, adjust);
> 
> Nothing stops adjust going negative here or wrapping

Yep, sorted in the next version.

> > +}
[...]

-apw

-------------------------------------------------------------------------
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