public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Neil Brown <neilb@cse.unsw.edu.au>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Strange dcache memory pressure when highmem enabled
Date: Tue, 14 Oct 2003 22:43:52 -0700	[thread overview]
Message-ID: <20031014224352.0171e971.akpm@osdl.org> (raw)
In-Reply-To: <16268.52761.907998.436272@notabene.cse.unsw.edu.au>

Neil Brown <neilb@cse.unsw.edu.au> wrote:
>
> I noticed that shrink_caches calls shrink_dcache_memory independant
>   of the classzone that is being shrunk.  So if we are trying to
>   shrink ZONE_HIGHMEM, the dentry_cache is shrunk, even though the
>   dentry_cache doesn't live in highmem.  However I'm not sure if I have
>   understood the classzones well enough for that observation even to
>   make sense.

Makes heaps of sense.  Here's an instabackport of what we did in 2.6:

 mm/vmscan.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff -puN mm/vmscan.c~a mm/vmscan.c
--- 24/mm/vmscan.c~a	2003-10-14 22:41:34.000000000 -0700
+++ 24-akpm/mm/vmscan.c	2003-10-14 22:42:22.000000000 -0700
@@ -640,11 +640,17 @@ int try_to_free_pages_zone(zone_t *class
 			nr_pages = shrink_caches(classzone, gfp_mask, nr_pages, &failed_swapout);
 			if (nr_pages <= 0)
 				return 1;
-			shrink_dcache_memory(vm_vfs_scan_ratio, gfp_mask);
-			shrink_icache_memory(vm_vfs_scan_ratio, gfp_mask);
+			if (classzone - classzone->zone_pgdat->node_zones <
+						ZONE_HIGHMEM) {
+				shrink_dcache_memory(vm_vfs_scan_ratio,
+							gfp_mask);
+				shrink_icache_memory(vm_vfs_scan_ratio,
+							gfp_mask);
 #ifdef CONFIG_QUOTA
-			shrink_dqcache_memory(vm_vfs_scan_ratio, gfp_mask);
+				shrink_dqcache_memory(vm_vfs_scan_ratio,
+							gfp_mask);
 #endif
+			}
 			if (!failed_swapout)
 				failed_swapout = !swap_out(classzone);
 		} while (--tries);

_


  parent reply	other threads:[~2003-10-15  5:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-15  4:33 Strange dcache memory pressure when highmem enabled Neil Brown
2003-10-15  5:05 ` Bryan O'Sullivan
2003-10-15  5:10   ` Neil Brown
2003-10-15  5:43 ` Andrew Morton [this message]
2003-10-15  5:46   ` Neil Brown
2003-10-15  9:58     ` Stephan von Krawczynski
2003-10-16 13:33   ` Andrea Arcangeli
2003-10-21 22:57     ` Neil Brown
2003-10-22  1:03       ` Andrea Arcangeli

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=20031014224352.0171e971.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@cse.unsw.edu.au \
    /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