Re: [PATCH 4/5] mm improvements

Andrew Morton
2004-02-04T10:11:53Z

Nick Piggin <piggin@cyberone.com.au> wrote:
>
> + if (zone->nr_active >= zone->nr_inactive*4)
> + /* ratio will be >= 2 */
> + imbalance = 8*nr_pages;
> + else if (zone->nr_active >= zone->nr_inactive*2)
> + /* 1 < ratio < 2 */
> + imbalance = 4*nr_pages*zone->nr_active / (zone->nr_inactive*2);

This can cause a divide-by-zero, yes?