Re: [PATCH] vmscan: page_check_references() check low order lumpy reclaim properly

From: KOSAKI Motohiro
Date: Fri Apr 16 2010 - 01:33:45 EST


> > + Â Â Â /*
> > + Â Â Â Â* If we need a large contiguous chunk of memory, or have
> > + Â Â Â Â* trouble getting a small set of contiguous pages, we
> > + Â Â Â Â* will reclaim both active and inactive pages.
> > + Â Â Â Â*/
> > + Â Â Â if (sc->order > PAGE_ALLOC_COSTLY_ORDER)
> > + Â Â Â Â Â Â Â sc->lumpy_reclaim = 1;
> > + Â Â Â else if (sc->order && priority < DEF_PRIORITY - 2)
> > + Â Â Â Â Â Â Â sc->lumpy_reclaim = 1;
> > + Â Â Â else
> > + Â Â Â Â Â Â Â sc->lumpy_reclaim = 0;
>
> How about making new function for readability instead of nesting else?
> int is_lumpy_reclaim(struct scan_control *sc)
> {
> ....
> }
>
> If you merge patch reduced stack usage of reclaim path, I think it's
> enough alone scan_control argument.
> It's just nitpick. :)
> If you don't mind, ignore, please.

Good opinion. I don't hope introduce the dependency of "reduced stack usage"
series. but I agree that I'll push your proposal later and separately.



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