Re: [PATCH 06/10] mm: vmscan: Have kswapd writeback pages based ondirty pages encountered, not priority

From: Rik van Riel
Date: Thu Mar 21 2013 - 13:56:40 EST

On 03/17/2013 11:11 AM, Mel Gorman wrote:
On Sun, Mar 17, 2013 at 07:42:39AM -0700, Andi Kleen wrote:
Mel Gorman <mgorman@xxxxxxx> writes:

@@ -495,6 +495,9 @@ typedef enum {
ZONE_CONGESTED, /* zone has many dirty pages backed by
* a congested BDI
+ ZONE_DIRTY, /* reclaim scanning has recently found
+ * many dirty file pages
+ */

Needs a better name. ZONE_DIRTY_CONGESTED ?

That might be confusing. The underlying BDI is not necessarily
congested. I accept your point though and will try thinking of a better


+ * currently being written then flag that kswapd should start
+ * writing back pages.
+ */
+ if (global_reclaim(sc) && nr_dirty &&
+ nr_dirty >= (nr_taken >> (DEF_PRIORITY - sc->priority)))
+ zone_set_flag(zone, ZONE_DIRTY);

I suppose you want to trace the dirty case here too.

I guess it wouldn't hurt to have a new tracepoint for when the flag gets
set. A vmstat might be helpful as well.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at