Messages in this thread | | | Date | Mon, 27 Feb 2006 19:33:02 +0100 | From | Pavel Machek <> | Subject | Re: [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/
| |