Saturday, June 6, 2009

Manual Extraction of Free pages from pcp or buddy list

Page count must be 0 when returning a page to the list of free pages (page->_count)

page->lru keeps the link inside pcp

count=1 just after extracting the page from any free list

pcp is locally locked by get_cpu()/put_cpu() and irq_save()/irq_restore().

buddy is globally locked by the corresponding zone's spinlocks. rmqueue* functions work on buddy allocator by using that lock. this spinlock does not make conflict with the pcp local locks.

No comments:

Post a Comment