mark_page_accessed mark_page_accessed() is the function that detects the working set /* * Mark a page as having seen activity. * * If it was already so marked, move it * to the active queue and drop the referenced * bit. Otherwise, just mark it for future * action.. */ void mark_page_accessed(struct page *page) { if (!PageActive(page) && PageReferenced(page)) { activate_page(page); ClearPageReferenced(page); return; } /* Mark the page referenced, AFTER checking for previous usage.. */ SetPageReferenced(page); }