* __get_free_pages problem, system then hangs
@ 2006-03-30 17:49 Jiri Slaby
0 siblings, 0 replies; only message in thread
From: Jiri Slaby @ 2006-03-30 17:49 UTC (permalink / raw)
To: Linux kernel mailing list
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
I am trying to get pages as memory place with code like this one:
mem = __get_free_pages(GFP_KERNEL | __GFP_ZERO, get_order(size));
if (mem == 0ul)
goto end;
page = virt_to_page(mem);
for (i = 0; i < (1 << get_order(size)); i++, page++) {
get_page(page);
SetPageReserved(page);
SetPageLocked(page);
}
What's wrong with `for' loop? When I am trying to mark them as reserved or
whatever you see there, the system hangs in few moments (some oopses with memory
allocation, obviously).
The problem disappears if:
a) get pages is called with __GFP_COMP flag and then it's sufficient to mark
only the first page (the rest is "bounded" to that one), but even if I mark all,
the problem doesn't appear,
b) I mark only the first page -- it's not what I want, I suppose
Size is 11k i. e. order is 2 (actually, 3 pages are needed) on my i386 system.
Could somebody tell me what am I still missing?
thanks,
- --
Jiri Slaby www.fi.muni.cz/~xslaby
~\-/~ jirislaby@gmail.com ~\-/~
B67499670407CE62ACC8 22A032CC55C339D47A7E
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFELBoVMsxVwznUen4RAoV+AJ0cPRrb7dLyIUPN0RkSpGVhD8LQmQCfelAJ
XDbNydUdRGHHJcN48A0Eib4=
=8vx7
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-03-30 17:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-30 17:49 __get_free_pages problem, system then hangs Jiri Slaby
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox