public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@zip.com.au>
To: lkml <linux-kernel@vger.kernel.org>
Subject: aa-180-activate_page_cleanup
Date: Tue, 19 Mar 2002 20:02:24 -0800	[thread overview]
Message-ID: <3C9809D0.9FEECFDB@zip.com.au> (raw)



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);
 }
 


-

                 reply	other threads:[~2002-03-20  4:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3C9809D0.9FEECFDB@zip.com.au \
    --to=akpm@zip.com.au \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox