* aa-180-activate_page_cleanup
@ 2002-03-20 4:02 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2002-03-20 4:02 UTC (permalink / raw)
To: lkml
Fold activate_page_nolock() into activate_page().
=====================================
--- 2.4.19-pre3/mm/swap.c~aa-180-activate_page_cleanup Tue Mar 19 19:49:03 2002
+++ 2.4.19-pre3-akpm/mm/swap.c Tue Mar 19 19:49:03 2002
@@ -36,18 +36,17 @@ pager_daemon_t pager_daemon = {
/*
* Move an inactive page to the active list.
*/
-static inline void activate_page_nolock(struct page * page)
-{
- if (PageLRU(page) && !PageActive(page)) {
- del_page_from_inactive_list(page);
- add_page_to_active_list(page);
- }
-}
-
void activate_page(struct page * page)
{
spin_lock(&pagemap_lru_lock);
- activate_page_nolock(page);
+ if (PageLRU(page)) {
+ if (!PageActive(page)) {
+ del_page_from_inactive_list(page);
+ add_page_to_active_list(page);
+ ClearPageReferenced(page);
+ } else
+ SetPageReferenced(page);
+ }
spin_unlock(&pagemap_lru_lock);
}
-
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-03-20 4:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-20 4:02 aa-180-activate_page_cleanup Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox