lkml.org 
[lkml]   [2012]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm: cma: Discard clean pages during contiguous allocation instead of migration
On Tue, 11 Sep 2012 09:41:52 +0900
Minchan Kim <minchan@kernel.org> wrote:

> This patch drops clean cache pages instead of migration during
> alloc_contig_range() to minimise allocation latency by reducing the amount
> of migration is necessary. It's useful for CMA because latency of migration
> is more important than evicting the background processes working set.
> In addition, as pages are reclaimed then fewer free pages for migration
> targets are required so it avoids memory reclaiming to get free pages,
> which is a contributory factor to increased latency.
>
> * from v1
> * drop migrate_mode_t
> * add reclaim_clean_pages_from_list instad of MIGRATE_DISCARD support - Mel
>
> I measured elapsed time of __alloc_contig_migrate_range which migrates
> 10M in 40M movable zone in QEMU machine.
>
> Before - 146ms, After - 7ms
>
> ...
>
> @@ -758,7 +760,9 @@ static unsigned long shrink_page_list(struct list_head *page_list,
> wait_on_page_writeback(page);
> }
>
> - references = page_check_references(page, sc);
> + if (!force_reclaim)
> + references = page_check_references(page, sc);

grumble. Could we please document `enum page_references' and
page_check_references()?

And the `force_reclaim' arg could do with some documentation. It only
forces reclaim under certain circumstances. They should be described,
and a reson should be provided.

Why didn't this patch use PAGEREF_RECLAIM_CLEAN? It is possible for
someone to dirty one of these pages after we tested its cleanness and
we'll then go off and write it out, but we won't be reclaiming it?

>
> ...
>


\
 
 \ /
  Last update: 2012-09-12 22:41    [W:0.618 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site