lkml.org 
[lkml]   [2014]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] mm: clean up zone flags
On Tue, Sep 02, 2014 at 06:26:53PM -0400, Johannes Weiner wrote:
> From 2420ad16df0634e073ad327f0f72472d9b03762b Mon Sep 17 00:00:00 2001
> From: Johannes Weiner <hannes@cmpxchg.org>
> Date: Tue, 2 Sep 2014 10:14:36 -0400
> Subject: [patch] mm: clean up zone flags
>
> Page reclaim tests zone_is_reclaim_dirty(), but the site that actually
> sets this state does zone_set_flag(zone, ZONE_TAIL_LRU_DIRTY), sending
> the reader through layers indirection just to track down a simple bit.
>
> Remove all zone flag wrappers and just use bitops against zone->flags
> directly. It's just as readable and the lines are barely any longer.
>
> Also rename ZONE_TAIL_LRU_DIRTY to ZONE_DIRTY to match ZONE_WRITEBACK,
> and remove the zone_flags_t typedef.
>
> Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
> Acked-by: David Rientjes <rientjes@google.com>

I would have gone with making them ZONE_TAIL_DIRTY and ZONE_TAIL_WRITEBACK
because to me it's clearer what the flag means. ZONE_DIRTY can be
interpreted as "the zone has dirty pages" which is not what reclaim
cares about, it cares about dirty pages at the tail of the LRU. However,
I don't feel strongly enough to make a big deal about it so

Acked-by: Mel Gorman <mgorman@suse.de>

Thanks.

--
Mel Gorman
SUSE Labs


\
 
 \ /
  Last update: 2014-09-05 13:01    [W:0.078 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site