[Tux3] rename of ext2_* to tux_*, and tux_sb() stuff.
hirofumi at mail.parknet.co.jp
Wed Nov 19 04:17:22 PST 2008
OGAWA Hirofumi <hirofumi at mail.parknet.co.jp> writes:
>> The might_sleep in the malloc wrapper... isn't there any might_sleep
>> in the kmalloc path? Maybe too deep down to be informative.
> Yes, slab does it obviously. I couldn't find by quick search in slub
> path, so if slub is also doing, we should remove it.
> I'll test slub...
Unfortunately, quick search was right. SLUB didn't warn by
test. (probably, I should send a patch to lkml) So, I tweaked malloc()
like the following.
might_sleep() is only for CONFIG_SLUB. And we would like to use
GFP_NOFS, not GFP_KERNEL.
If it's ok, please pull again. Thanks.
diff -puN user/kernel/tux3.h~malloc-tweaks user/kernel/tux3.h
--- tux3/user/kernel/tux3.h~malloc-tweaks 2008-11-19 21:02:27.000000000 +0900
+++ tux3-hirofumi/user/kernel/tux3.h 2008-11-19 21:04:51.000000000 +0900
@@ -242,8 +242,10 @@ static inline map_t *mapping(struct inod
static inline void *malloc(size_t size)
+#ifdef CONFIG_SLUB /* 22.214.171.124 doesn't warn */
- return kmalloc(size, GFP_KERNEL);
+ return kmalloc(size, GFP_NOFS);
static inline void free(void *ptr)
OGAWA Hirofumi <hirofumi at mail.parknet.co.jp>
Tux3 mailing list
Tux3 at tux3.org
More information about the Tux3