How to check which applications are using hugepages

You can find how much is allocated and how much is actually used by HugePages by run the following command. $ grep -i huge /proc/meminfo AnonHugePages: 776192 kB HugePages_Total: 241 HugePages_Free: 113 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB But, there's a time you also want to know which applications are actually used HugePages. You … Continue reading How to check which applications are using hugepages

How to build a module with source codes in separate directories.

If you want to use separate directories for source files and target modules, you can use below scheme. mod_main.c #include #include MODULE_LICENSE("GPL"); static int __init mod_entry(void) { return 0; } static void __exit mod_exit(void) { return; } module_init(mod_entry); module_exit(mod_exit); sub_mod.c #include #include int sub_func(int i) { printk("Hello %d", i); return 0; } EXPORT_SYMBOL(sub_func); http://pagead2.googlesyndication.com/pagead/show_ads.js Makefile … Continue reading How to build a module with source codes in separate directories.

module taint

static char *module_flags(struct module *mod, char *buf) { int bx = 0; if (mod->taints || mod->state == MODULE_STATE_GOING || mod->state == MODULE_STATE_COMING) { buf[bx++] = '('; if (mod->taints & (1 <taints & (1 <taints & (1 <state == MODULE_STATE_GOING) buf[bx++] = '-'; /* Show a + for module-is-being-loaded */ if (mod->state == MODULE_STATE_COMING) buf[bx++] = … Continue reading module taint

Why cached memory doesn’t reclaimed with drop_caches request?

It is very common that your system is suffered from lack of free memory and found that most of the physical memory was consumed by 'buffer/cache'. Because 'buffer/cache' can be reclaimed when memory is under pressure, user usually doesn't need to worry about that and most of the time, keeping cache is desirable as it … Continue reading Why cached memory doesn’t reclaimed with drop_caches request?