What’s virtual address limit of 32bit/64bit Linux kernel?

RHEL 5 code 32bit: include/asm-i386/processor.h /* * User space process size: 3GB (default). */ #define TASK_SIZE (PAGE_OFFSET) 64bit: include/asm-x86_64/processor.h /* * User space process size. 47bits minus one guard page. */ #define TASK_SIZE64 (0x800000000000UL - 4096) /* This decides where the kernel will search for a free chunk of vm * space during mmap's. */ … Continue reading What’s virtual address limit of 32bit/64bit Linux kernel?

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.

How to debug an application

If you want to debug an application that is shipped with the fedora, you can use the following command. [root@localhost ~]# debuginfo-install gedit-3.4.2-1.fc17.x86_64 Loaded plugins: langpacks, presto, refresh-packagekit enabling fedora-debuginfo enabling updates-debuginfo --> Running transaction check ---> Package atk-debuginfo.x86_64 0:2.4.0-1.fc17 will be installed ---> Package cairo-debuginfo.x86_64 0:1.10.2-7.fc17 will be installed ---> Package enchant-debuginfo.x86_64 1:1.6.0-4.fc17 will … Continue reading How to debug an application