[lkml]   [2002]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Good way to free as much memory as possible under 2.5.34?
Rik van Riel wrote:
> On Fri, 13 Sep 2002, Pavel Machek wrote:
> > Allocating memory is pain because I have to free it afterwards. Yep I
> > have such code, but it is ugly. try_to_free_pages() really seems like
> > cleaner solution to me... if you only tell me how to fix it :-).
> "Fixing" the VM just so it behaves the way swsuspend wants is
> out. If swsuspend relies on all other subsystems playing nicely,
> I think it should be removed from the kernel.

Yup. Martin Bligh is cooking up a multi-page allocation API, so when that's
in place, swsusp need only do:

alloc_many_pages(&foo, nr_pages, __GFP_HIGHMEM|__GFP_WAIT);

So I suggest you do something local for the while, plan to use that later.

(Actually, the implementation would probably have a heart attack if you
asked for 100,000 pages so you may need to sit in a loop there; we'll see).
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:28    [W:0.059 / U:3.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site