From: Christoph Lameter <clameter@sgi.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Ravikiran G Thirumalai <kiran@scalex86.org>,
linux-mm@kvack.org, shai@scalex86.org
Subject: Re: [rfc] [patch] mm: zone_reclaim fix for pseudo file systems
Date: Tue, 31 Jul 2007 12:30:43 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0707311220200.6093@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <20070731013514.146ab1bb.akpm@linux-foundation.org>
On Tue, 31 Jul 2007, Andrew Morton wrote:
> On Tue, 31 Jul 2007 01:27:51 -0700 Ravikiran G Thirumalai <kiran@scalex86.org> wrote:
>
> > >From what I can see with .21 and .22, going into reclaim is a problem rather
> > than reclaim efficiency itself. Sure, if unreclaimable pages are not on LRU
> > it would be good, but the main problem for my narrow eyes is going into
> > reclaim when there are no reclaimable pages, and the fact that benchmark
> > works as expected with the fixed arithmetic reinforces that impression.
> >
> > What am I missing?
>
> The fact that is there are "no reclaimable pages" then the all_unreclaimable
> logic should kick in and fix the problem.
>
> Except zone_reclaim() fails to implement it.
It would be easy to implement. Just set a flag when we fail to reclaim.
But this will result in the same deadbeat behavior like regular reclaim.
If the unmapped pages turn out to be unreclaimable then we essentially
switch off zone reclaim and do small attempts at reclaim until we are
successful. This may take a long time and we may be unsuccessful in
detecting unmapped pages that become reclaimable.
Index: linux-2.6/include/linux/mmzone.h
===================================================================
--- linux-2.6.orig/include/linux/mmzone.h 2007-07-31 12:25:18.000000000 -0700
+++ linux-2.6/include/linux/mmzone.h 2007-07-31 12:25:41.000000000 -0700
@@ -234,6 +234,7 @@ struct zone {
unsigned long nr_scan_inactive;
unsigned long pages_scanned; /* since last reclaim */
int all_unreclaimable; /* All pages pinned */
+ int unmapped_unreclaimable; /* Unmapped pages are unreclaimable */
/* A count of how many reclaimers are scanning this zone */
atomic_t reclaim_in_progress;
Index: linux-2.6/mm/vmscan.c
===================================================================
--- linux-2.6.orig/mm/vmscan.c 2007-07-31 12:21:23.000000000 -0700
+++ linux-2.6/mm/vmscan.c 2007-07-31 12:29:27.000000000 -0700
@@ -1759,7 +1759,10 @@ static int __zone_reclaim(struct zone *z
note_zone_scanning_priority(zone, priority);
nr_reclaimed += shrink_zone(priority, zone, &sc);
priority--;
- } while (priority >= 0 && nr_reclaimed < nr_pages);
+ } while (priority >= 0 && nr_reclaimed < nr_pages &&
+ !zone->unmapped_unreclaimable);
+
+ zone->unmapped_reclaimable = nr_reclaimed > 0;
}
slab_reclaimable = zone_page_state(zone, NR_SLAB_RECLAIMABLE);
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2007-07-31 19:30 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-27 23:27 Ravikiran G Thirumalai
2007-07-30 18:12 ` Christoph Lameter
2007-07-30 20:23 ` Andrew Morton
2007-07-30 20:31 ` Christoph Lameter
2007-07-30 21:12 ` Lee Schermerhorn
2007-07-31 0:01 ` Ravikiran G Thirumalai
2007-07-31 0:20 ` Andrew Morton
2007-07-31 0:27 ` Christoph Lameter
2007-07-31 1:06 ` Andrew Morton
2007-07-31 1:52 ` Christoph Lameter
2007-07-31 1:56 ` Ravikiran G Thirumalai
2007-07-31 2:01 ` Christoph Lameter
2007-07-31 2:27 ` Andrew Morton
2007-07-31 2:36 ` Christoph Lameter
2007-07-31 4:47 ` Andrew Morton
2007-07-31 5:00 ` Christoph Lameter
2007-07-31 5:17 ` Andrew Morton
2007-07-31 5:33 ` Christoph Lameter
2007-07-31 5:58 ` Andrew Morton
2007-07-31 6:09 ` Christoph Lameter
2007-07-31 6:18 ` Andrew Morton
2007-07-31 19:35 ` Christoph Lameter
2007-07-31 19:46 ` Andrew Morton
2007-07-31 19:50 ` Christoph Lameter
2007-07-31 8:27 ` Ravikiran G Thirumalai
2007-07-31 8:35 ` Andrew Morton
2007-07-31 19:30 ` Christoph Lameter [this message]
2007-07-31 19:20 ` Christoph Lameter
2007-07-31 7:15 ` Ravikiran G Thirumalai
2007-07-31 19:18 ` Christoph Lameter
2007-07-31 1:36 ` Ravikiran G Thirumalai
2007-07-31 1:53 ` Andrew Morton
2007-07-31 1:56 ` Christoph Lameter
2007-07-31 2:19 ` Christoph Lameter
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=Pine.LNX.4.64.0707311220200.6093@schroedinger.engr.sgi.com \
--to=clameter@sgi.com \
--cc=akpm@linux-foundation.org \
--cc=kiran@scalex86.org \
--cc=linux-mm@kvack.org \
--cc=shai@scalex86.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