Re: [patch 3/7] mm: make page writeback obey cpuset constraints

From: Peter Zijlstra
Date: Tue Oct 28 2008 - 13:32:00 EST


On Tue, 2008-10-28 at 09:08 -0700, David Rientjes wrote:

> +/*
> + * Calculate the limits relative to the current cpuset
> + *
> + * We do not disregard highmem because all nodes (except maybe node 0) have
> + * either all memory in HIGHMEM (32-bit) or all memory in non-HIGHMEM (64-bit).
> + * If we would disregard highmem, then cpuset throttling would not work on
> + * 32-bit.
> + */
> +int cpuset_populate_dirty_limits(struct dirty_limits *dl,
> + unsigned long *dirtyable_memory,
> + unsigned long *nr_mapped,
> + const nodemask_t *nodes)
> +{
> + int node;
> +
> + if (likely(!nodes || nodes_subset(node_online_map, *nodes)))
> + return 0;
> + for_each_node_mask(node, *nodes) {
> + if (!node_online(node))
> + continue;
> + dl->nr_dirty += node_page_state(node, NR_FILE_DIRTY);
> + dl->nr_unstable += node_page_state(node, NR_UNSTABLE_NFS);
> + dl->nr_writeback += node_page_state(node, NR_WRITEBACK);
> + dirtyable_memory +=

*dirtyable_memory perhaps?

> + node_page_state(node, NR_ACTIVE_ANON) +
> + node_page_state(node, NR_ACTIVE_FILE) +
> + node_page_state(node, NR_INACTIVE_ANON) +
> + node_page_state(node, NR_INACTIVE_FILE) +
> + node_page_state(node, NR_FREE_PAGES);
> + nr_mapped +=

idem?

> + node_page_state(node, NR_FILE_MAPPED) +
> + node_page_state(node, NR_ANON_PAGES);
> + }
> + return 1;
> +}



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