[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2f11576a0905172035k3f26b8d6r84af555a94b1d70e@mail.gmail.com>
Date: Mon, 18 May 2009 12:35:31 +0900
From: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
To: Wu Fengguang <fengguang.wu@...el.com>
Cc: LKML <linux-kernel@...r.kernel.org>, linux-mm <linux-mm@...ck.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Rik van Riel <riel@...hat.com>,
Christoph Lameter <cl@...ux-foundation.org>
Subject: Re: [PATCH 1/4] vmscan: change the number of the unmapped files in
zone reclaim
>> --- a/mm/vmscan.c
>> +++ b/mm/vmscan.c
>> @@ -2397,6 +2397,7 @@ static int __zone_reclaim(struct zone *z
>> .isolate_pages = isolate_pages_global,
>> };
>> unsigned long slab_reclaimable;
>> + long nr_unmapped_file_pages;
>>
>> disable_swap_token();
>> cond_resched();
>> @@ -2409,9 +2410,11 @@ static int __zone_reclaim(struct zone *z
>> reclaim_state.reclaimed_slab = 0;
>> p->reclaim_state = &reclaim_state;
>>
>> - if (zone_page_state(zone, NR_FILE_PAGES) -
>> - zone_page_state(zone, NR_FILE_MAPPED) >
>> - zone->min_unmapped_pages) {
>> + nr_unmapped_file_pages = zone_page_state(zone, NR_INACTIVE_FILE) +
>> + zone_page_state(zone, NR_ACTIVE_FILE) -
>> + zone_page_state(zone, NR_FILE_MAPPED);
>
> This can possibly go negative.
Is this a problem?
negative value mean almost pages are mapped. Thus
(nr_unmapped_file_pages > zone->min_unmapped_pages) => 0
is ok, I think.
>
>> + if (nr_unmapped_file_pages > zone->min_unmapped_pages) {
>> /*
>> * Free memory by calling shrink zone with increasing
>> * priorities until we have enough memory freed.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists