From: Andrew Morton <akpm@zip.com.au>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: [patch 2/13] leave truncate's orphaned pages on the LRU
Date: Tue, 16 Jul 2002 22:29:26 -0700 [thread overview]
Message-ID: <3D3500B6.741ADEDD@zip.com.au> (raw)
Fix to the page reclaim code from Rik.
Anonymous pages which have buffers arise when
truncate_complete_page()'s call to ->releasepage() failed. Those pages
may still be mapped into process address spaces.
We should not remove them from the LRU, because that makes them
unswappable and they hang around until process exit.
vmscan.c | 12 ++----------
1 files changed, 2 insertions(+), 10 deletions(-)
--- 2.5.26/mm/vmscan.c~rmap-lru-fix Tue Jul 16 21:46:28 2002
+++ 2.5.26-akpm/mm/vmscan.c Tue Jul 16 21:59:41 2002
@@ -235,19 +235,11 @@ shrink_cache(int nr_pages, zone_t *class
if (try_to_release_page(page, gfp_mask)) {
if (!mapping) {
- /*
- * We must not allow an anon page
- * with no buffers to be visible on
- * the LRU, so we unlock the page after
- * taking the lru lock
- */
- spin_lock(&pagemap_lru_lock);
- unlock_page(page);
- __lru_cache_del(page);
-
/* effectively free the page here */
+ unlock_page(page);
page_cache_release(page);
+ spin_lock(&pagemap_lru_lock);
if (--nr_pages)
continue;
break;
.
reply other threads:[~2002-07-17 5:18 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=3D3500B6.741ADEDD@zip.com.au \
--to=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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