[lkml]   [2010]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH]: Compress hibernation image with LZO (in-kernel)
On Sat, 2010-07-31 at 11:18 +1000, Nigel Cunningham wrote:
> It should be possible to do the allocation at that point. I might see
> if I can take a look later on.

Maybe it's related to the fact that with vmalloc() you get a different
thing then with __get_free_pages() in terms of using it with devices.

If found this in Linux Device Drivers:
Addresses allocated by vmalloc can't be used outside of the
microprocessor, because they make sense only on top of the processor's
MMU. When a driver needs a real physical address (such as a DMA address,
used by peripheral hardware to drive the system's bus), you can't easily
use vmalloc. The right time to call vmalloc is when you are allocating
memory for a large sequential buffer that exists only in software.

I'm guessing the page allocated by vmalloc() eventually gets passed down
the I/O chain and is supposed to be read into by some hardware, which
then causes a crash. (He, he... kernel according to Bojan - please
ignore :-).

In the first iteration of the patch, I allocated just one page using
__get_free_page() and used that for I/O operations. The only overhead
there was memcpy() from the page to vmalloc()-ed cmp. I can go back to
that easily. It didn't actually make any significant difference to


 \ /
  Last update: 2010-07-31 03:37    [W:0.069 / U:0.372 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site