Re: [patch 1/4] mm: exclude reserved pages from dirtyable memory

2011-09-20 Thread Rik van Riel

On 09/20/2011 09:45 AM, Johannes Weiner wrote:

The amount of dirtyable pages should not include the total 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:



Signed-off-by: Johannes Weinerjwei...@redhat.com


Reviewed-by: Rik van Riel r...@redhat.com
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch 2/4] mm: writeback: distribute write pages across allowable zones

2011-09-20 Thread Rik van Riel

On 09/20/2011 09:45 AM, Johannes Weiner wrote:

This patch allows allocators to pass __GFP_WRITE when they know in
advance that the allocated page will be written to and become dirty
soon.  The page allocator will then attempt to distribute those
allocations across zones, such that no single zone will end up full of
dirty, and thus more or less, unreclaimable pages.

The global dirty limits are put in proportion to the respective zone's
amount of dirtyable memory and allocations diverted to other zones
when the limit is reached.

For now, the problem remains for NUMA configurations where the zones
allowed for allocation are in sum not big enough to trigger the global
dirty limits, but a future approach to solve this can reuse the
per-zone dirty limit infrastructure laid out in this patch to have
dirty throttling and the flusher threads consider individual zones.

Signed-off-by: Johannes Weinerjwei...@redhat.com


Reviewed-by: Rik van Riel r...@redhat.com

The amount of work done in a __GFP_WRITE allocation looks
a little daunting, but doing that a million times probably
outweighs waiting on the disk even once, so...
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch 3/4] mm: filemap: pass __GFP_WRITE from grab_cache_page_write_begin()

2011-09-20 Thread Rik van Riel

On 09/20/2011 10:25 AM, Christoph Hellwig wrote:

In addition to regular write shouldn't __do_fault and do_wp_page also
calls this if they are called on file backed mappings?



Probably not do_wp_page since it always creates an
anonymous page, which are not very relevant to the
dirty page cache accounting.
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch 4/4] Btrfs: pass __GFP_WRITE for buffered write page allocations

2011-09-20 Thread Rik van Riel

On 09/20/2011 09:45 AM, Johannes Weiner wrote:

Tell the page allocator that pages allocated for a buffered write are
expected to become dirty soon.

Signed-off-by: Johannes Weinerjwei...@redhat.com


Reviewed-by: Rik van Riel r...@redhat.com
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html