[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <28c262360902100403m772576afp3c9212157dc9fcd@mail.gmail.com>
Date: Tue, 10 Feb 2009 21:03:19 +0900
From: MinChan Kim <minchan.kim@...il.com>
To: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
Cc: Johannes Weiner <hannes@...xchg.org>,
Rik van Riel <riel@...hat.com>,
William Lee Irwin III <wli@...ementarian.org>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [RFC] vmscan: initialize sc->nr_reclaimed in do_try_to_free_pages()
On Tue, Feb 10, 2009 at 8:43 PM, KOSAKI Motohiro
<kosaki.motohiro@...fujitsu.com> wrote:
>> ---
>> diff --git a/mm/vmscan.c b/mm/vmscan.c
>> index 9a27c44..18406ee 100644
>> --- a/mm/vmscan.c
>> +++ b/mm/vmscan.c
>> @@ -1699,6 +1699,7 @@ unsigned long try_to_free_pages(struct zonelist
>> *zonelist, int order,
>> .order = order,
>> .mem_cgroup = NULL,
>> .isolate_pages = isolate_pages_global,
>> + .nr_reclaimed = 0,
>> };
>>
>> return do_try_to_free_pages(zonelist, &sc);
>> @@ -1719,6 +1720,7 @@ unsigned long
>> try_to_free_mem_cgroup_pages(struct mem_cgroup *mem_cont,
>> .order = 0,
>> .mem_cgroup = mem_cont,
>> .isolate_pages = mem_cgroup_isolate_pages,
>> + .nr_reclaimed = 0;
>> };
>> struct zonelist *zonelist;
>
> I think this code is better.
>
> and, I think we also need to
>
>
> static int __zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)
> {
> /* Minimum pages needed in order to stay on node */
> const unsigned long nr_pages = 1 << order;
> struct task_struct *p = current;
> struct reclaim_state reclaim_state;
> int priority;
> struct scan_control sc = {
> .may_writepage = !!(zone_reclaim_mode & RECLAIM_WRITE),
> .may_swap = !!(zone_reclaim_mode & RECLAIM_SWAP),
> .swap_cluster_max = max_t(unsigned long, nr_pages,
> SWAP_CLUSTER_MAX),
> .gfp_mask = gfp_mask,
> .swappiness = vm_swappiness,
> .isolate_pages = isolate_pages_global,
> + .nr_reclaimed = 0;
> };
>
>
>
>
>
Hmm.. I missed that. Thanks.
There is one in shrink_all_memory.
--
Kinds regards,
MinChan Kim
--
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