if (in_interrupt() && (gfp_mask & __GFP_WAIT)) {
static int count = 0;
if (++count < 5) {
printk("gfp called nonatomically .... ");
gfp_mask &= ~__GFP_WAIT;
}
}
I think that we should always do gfp_mask &= ~__GFP_WAIT, not only
for first 4 occurences of this problem, because of try_to_free_pages
tries to lock_kernel() and this does not look too healthy to me.
Yes, I know that this should not happen, but if we checks for this
error, we should do workarounds correctly.
Or am I completely wrong and it is OK to call lock_kernel() (and
try_to_free_pages, swap_out(GFP_WAIT,...)) from interrupt handler?
Thanks,
Petr Vandrovec
vandrove@vc.cvut.cz
P.S.: If it is not OK (2.1.109p2):
--- linux/mm/page_alloc.c.orig Thu Jul 16 10:50:05 1998
+++ linux/mm/page_alloc.c Thu Jul 16 10:51:47 1998
@@ -273,8 +273,8 @@
if (++count < 5) {
printk("gfp called nonatomically from interrupt %p\n",
__builtin_return_address(0));
- gfp_mask &= ~__GFP_WAIT;
}
+ gfp_mask &= ~__GFP_WAIT;
}
for (;;) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html