3 * Compare local cmpxchg with irq disable / enable with cmpxchg_local for slub.
7 #include <linux/jiffies.h>
8 #include <linux/compiler.h>
9 #include <linux/init.h>
10 #include <linux/module.h>
11 #include <linux/calc64.h>
12 #include <asm/timex.h>
13 #include <asm/system.h>
15 extern atomic_t slub_fast_count
;
16 extern atomic_t slub_slow_count
;
18 static int slub_test_init(void)
20 printk("Fast slub free: %u\n", atomic_read(&slub_fast_count
));
21 printk("Slow slub free: %u\n", atomic_read(&slub_slow_count
));
22 return -EAGAIN
; /* Fail will directly unload the module */
25 static void slub_test_exit(void)
27 printk(KERN_ALERT
"test exit\n");
30 module_init(slub_test_init
)
31 module_exit(slub_test_exit
)
33 MODULE_LICENSE("GPL");
34 MODULE_AUTHOR("Mathieu Desnoyers");
35 MODULE_DESCRIPTION("SLUB test");
This page took 0.032933 seconds and 4 git commands to generate.