[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111003112205.GA5011@suse.de>
Date: Mon, 3 Oct 2011 12:22:05 +0100
From: Mel Gorman <mgorman@...e.de>
To: Johannes Weiner <jweiner@...hat.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Christoph Hellwig <hch@...radead.org>,
Dave Chinner <david@...morbit.com>,
Wu Fengguang <fengguang.wu@...el.com>, Jan Kara <jack@...e.cz>,
Rik van Riel <riel@...hat.com>,
Minchan Kim <minchan.kim@...il.com>,
Chris Mason <chris.mason@...cle.com>,
Theodore Ts'o <tytso@....edu>,
Andreas Dilger <adilger.kernel@...ger.ca>,
Shaohua Li <shaohua.li@...el.com>, xfs@....sgi.com,
linux-btrfs@...r.kernel.org, linux-ext4@...r.kernel.org,
linux-mm@...ck.org, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [patch 1/5] mm: exclude reserved pages from dirtyable memory
On Fri, Sep 30, 2011 at 09:17:20AM +0200, Johannes Weiner wrote:
> The amount of dirtyable pages should not include the full number of
> free pages: there is a number of reserved pages that the page
> allocator and kswapd always try to keep free.
>
> The closer (reclaimable pages - dirty pages) is to the number of
> reserved pages, the more likely it becomes for reclaim to run into
> dirty pages:
>
> +----------+ ---
> | anon | |
> +----------+ |
> | | |
> | | -- dirty limit new -- flusher new
> | file | | |
> | | | |
> | | -- dirty limit old -- flusher old
> | | |
> +----------+ --- reclaim
> | reserved |
> +----------+
> | kernel |
> +----------+
>
> This patch introduces a per-zone dirty reserve that takes both the
> lowmem reserve as well as the high watermark of the zone into account,
> and a global sum of those per-zone values that is subtracted from the
> global amount of dirtyable pages. The lowmem reserve is unavailable
> to page cache allocations and kswapd tries to keep the high watermark
> free. We don't want to end up in a situation where reclaim has to
> clean pages in order to balance zones.
>
> Not treating reserved pages as dirtyable on a global level is only a
> conceptual fix. In reality, dirty pages are not distributed equally
> across zones and reclaim runs into dirty pages on a regular basis.
>
> But it is important to get this right before tackling the problem on a
> per-zone level, where the distance between reclaim and the dirty pages
> is mostly much smaller in absolute numbers.
>
> Signed-off-by: Johannes Weiner <jweiner@...hat.com>
> Reviewed-by: Rik van Riel <riel@...hat.com>
Acked-by: Mel Gorman <mgorman@...e.de>
--
Mel Gorman
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists