> On Wed, 1 Sep 2010, Mel Gorman wrote: > > > > > > if (delta < 0 && abs(delta) > nr_free_pages) > > > > > delta = -nr_free_pages; > > > > > > Not sure what the point here is. If the delta is going below zero then > > > there was a concurrent operation updating the counters negatively while > > > we summed up the counters. > > > > The point is if the negative delta is greater than the current value of > > nr_free_pages then nr_free_pages would underflow when delta is applied to it. > > Ok. then > > nr_free_pages += delta; > if (nr_free_pages < 0) > nr_free_pages = 0; nr_free_pages is unsined. this wouldn't works ;) -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxxx For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>