I'm trying to understand page's usage counter. A just allocated page shouldn't have its page count zeroed?
I tryied the code below and the result surprised me:
page = page_cache_alloc_cold(vmapping); if (!page) { return NULL; }
printk("Page count after alloc: %i\n", page_count(page));
Result: Page count after alloc: 1
Where is the page count incremented?
Running kernel 2.6.8-rc3.
TIA, Luciano
-- Luciano A. Stertz luciano@xxxxxxxxxxxx T&T Engenheiros Associados Ltda http://www.tteng.com.br Fone/Fax (51) 3224 8425
-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/