Re: swsusp: 8-order allocation failure on demand (update)
From: Pavel Machek
Date: Sat Oct 16 2004 - 16:26:43 EST
Hi!
> > > > Unfortunately that's rather ugly. You'd ~32 bytes per 4K page, that's
> > > > almost 1% overhead, not nice. Better solution (but more work) is to
> > > > switch to link-lists or integrate swsusp2.
> > >
> > > Well, I wonder if the page allocation failures are a swsusp problem,
> > > really.
> >
> > Yes, they are. Kernel memory allocation is not design to do 8-order
> > allocations properly. swsusp really should not use them.
>
> Now that's clear, thanks. Could you tell me, please, what I need to know to
> understand the swsusp code and what I should start with?
On bootup, prealloc, say, order-9 alocation.
In alloc_pagedir(), do not allocate anything, but check that data fit
in preallocated area, and fail if not.
There's free_pages( pagedir_save, ...) somewhere, remove that so
pagedir is never freed and you can resume multiple times.
Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/