lkml.org 
[lkml]   [2006]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH -mm 0/2] mm: shrink_all_memory improvements
Hi!

> The following two patches are designed to improve the shrink_all_memory()
> function used by swsusp and other pm functions.
>
> The first patch makes shrink_all_memory() overflow-resistant. The problem is
> that, AFAICT, balance_pgdat(pgdat, nr_to_free, 0) may free more than nr_to_free
> pages, in which case nr_to_free, being unsigned, will overflow (and obviously
> it cannot be less than 0). Also if the argument is too big, strange things may
> happen.
>
> The first patch adds a workaround of the problem that shrink_all_memory() may
> return 0 even if there still are some pages to free. WIth this patch applied
> it sometimes frees 2 times as many pages as without it on my box.
>
> Please have a look and comment.

ACK on the first one, Andrew, please suggest how to do the second one
better.
Pavel
--
Web maintainer for suspend.sf.net (www.sf.net/projects/suspend) wanted...
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-02-27 19:46    [W:0.228 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site