Mmvmscanc

static unsigned long isolate_lru_pages(unsigned long nr_to_scan, struct list_head *src, struct list_head *dst, unsigned long *scanned, int order, int mode)

unsigned long nr_taken = 0; unsigned long scan;

for (scan = 0; scan < nr_to_scan && !list_empty(src); scan++) { struct page *page; unsigned long pfn; unsigned long end_pfn; unsigned long page_pfn; int zone_id;

continue;

The for loop iterates until the desired number of pages has been scanned. If no desired allocation order is given in order, each loop pass continues after isolating a single page from the LRU list.

However, more work is required for lumpy page reclaim. Recall that page_to_pfn and pfn_to_page allow converting between instances of struct page and the corresponding page frame number, and vice versa:

Continue reading here: Mmvmscanc

Was this article helpful?

+1 0