Re: [PATCH 13/33] readahead: state based method - aging accounting

Andrew Morton
2006-05-26T17:05:06Z

(hey, I haven't finished reading the last batch yet)

Wu Fengguang <wfg@mail.ustc.edu.cn> wrote:
>
> /*
> + * The node's effective length of inactive_list(s).
> + */
> +static unsigned long node_free_and_cold_pages(void)
> +{
> + unsigned int i;
> + unsigned long sum = 0;
> + struct zone *zones = NODE_DATA(numa_node_id())->node_zones;
> +
> + for (i = 0; i < MAX_NR_ZONES; i++)
> + sum += zones[i].nr_inactive +
> + zones[i].free_pages - zones[i].pages_low;
> +
> + return sum;
> +}

I guess this should go into page_alloc.c along with all the similar functions.

Is this function well-named? Why does it have "cold" in the name?