Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx> wrote: > Note that "deferred" allocation doesn't always > happen, especially when > you use GFP_ATOMIC. Deferred allocation only happens > if memory > allocator can not satisfy your request due to lack > of free RAM, so it > sleeps and wait until some amount of memory is > released.... You mean user level processes or kernel/kernel space modules? I think kernel space side... AFAIK, user level mem. requests is deferred until they are actually needed, at least Understanding the Linux Kernel book says so... > yes, IMHO this is correct. Like Fawaad said, memory > area that is mapped > into kernel address space (above PAGE_OFFSET) always > has same virtual > address no matter what context you are in (process > context, interrupt > context. In this case, since module is also a part > of kernel, any > allocation done via kmalloc is also mapped on kernel > address space, > thus has constant virtual address on every > situation. Can you give me a pointer in the kernel sources? I think buddy allcator is responsible for it. i.e. is it done at mm initialization phase or not? I looked at sources and see in mm/page_alloc.c #ifdef WANT_PAGE_VIRTUAL /* The shift won't overflow because ZONE_NORMAL is below 4G. */ if (!is_highmem_idx(zone)) set_page_address(page, __va(start_pfn << PAGE_SHIFT)); #endif But this assumes WANT_PAGE_VIRTUAL... > Hope it explains the issue better.... Thanks... ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/