lkml.org 
[lkml]   [2005]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Memory pressure handling with iSCSI

> It happens here, a bit. My machine goes up to 60% dirty when it should be
> clamping at 40%.
>
> The variable `total_pages' in page-writeback.c (from
> nr_free_pagecache_pages()) is too high. I trace it back to here:
>
> On node 0 totalpages: 1572864
> DMA zone: 4096 pages, LIFO batch:1
> Normal zone: 1568768 pages, LIFO batch:31
> HighMem zone: 0 pages, LIFO batch:1
>
> This machine only has 4G of memory, so the platform code is overestimating
> the number of pages by 50%. Can you please check your dmesg, see if your
> system is also getting this wrong?

I think we're repeatedly iterating over the same zones by walking the
zonelists:

static unsigned int nr_free_zone_pages(int offset)
{
pg_data_t *pgdat;
unsigned int sum = 0;
int i;

for_each_pgdat(pgdat) {
struct zone *zone;

for (i = 0; i < MAX_NR_ZONES; i++) {
unsigned long size, high;

zone = pgdat->node_zones[i];
size = zone->present_pages;
high = zone->pages_high;

if (size > high)
sum += size - high;
}
}
}

Does that look more sensible? I'd send you a real patch, except the
box just crashed ;-)

M.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-07-27 03:24    [W:0.552 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site