Re: [RFC] vmscan: initialize sc->nr_reclaimed in do_try_to_free_pages()

From: KOSAKI Motohiro
Date: Tue Feb 10 2009 - 07:06:51 EST


> > 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.

No.
__zone_reclaim isn't a part of shrink_all_memory().

Currently, shrink_all_memory() don't use sc.nr_reclaimed member.
(maybe, it's another wrong thing ;)



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