Mel Gorman a6bc32b899 mm: compaction: introduce sync-light migration for use by compaction
This patch adds a lightweight sync migrate operation MIGRATE_SYNC_LIGHT
mode that avoids writing back pages to backing storage.  Async compaction
maps to MIGRATE_ASYNC while sync compaction maps to MIGRATE_SYNC_LIGHT.
For other migrate_pages users such as memory hotplug, MIGRATE_SYNC is
used.

This avoids sync compaction stalling for an excessive length of time,
particularly when copying files to a USB stick where there might be a
large number of dirty pages backed by a filesystem that does not support
->writepages.

[aarcange@redhat.com: This patch is heavily based on Andrea's work]
[akpm@linux-foundation.org: fix fs/nfs/write.c build]
[akpm@linux-foundation.org: fix fs/btrfs/disk-io.c build]
Signed-off-by: Mel Gorman <mgorman@suse.de>
Reviewed-by: Rik van Riel <riel@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Minchan Kim <minchan.kim@gmail.com>
Cc: Dave Jones <davej@redhat.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Andy Isaacson <adi@hexapodia.org>
Cc: Nai Xia <nai.xia@gmail.com>
Cc: Johannes Weiner <jweiner@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-12 20:13:09 -08:00
..
2012-01-03 22:55:04 -05:00
2012-01-03 22:54:53 -05:00
2012-01-03 22:54:53 -05:00
2012-01-03 22:54:07 -05:00
2012-01-09 16:36:12 -05:00
2012-01-03 22:54:57 -05:00
2012-01-03 22:55:10 -05:00
2012-01-03 22:54:54 -05:00
2012-01-09 10:48:11 -05:00
2012-01-10 13:45:22 -08:00
2012-01-10 13:45:22 -08:00
2011-03-31 11:26:23 -03:00
2012-01-03 22:55:01 -05:00
2012-01-03 22:55:07 -05:00
2012-01-10 13:45:22 -08:00
2012-01-03 22:55:03 -05:00
2011-11-02 16:07:03 -07:00
2012-01-03 22:55:11 -05:00
2012-01-03 22:54:54 -05:00
2011-11-16 09:21:50 +01:00
2012-01-03 22:54:07 -05:00
2012-01-10 13:06:32 -05:00
2012-01-12 20:13:04 -08:00
2012-01-03 22:52:39 -05:00
2012-01-05 15:40:12 -08:00
2012-01-03 22:54:07 -05:00
2011-05-26 10:01:43 -06:00
2011-10-31 17:30:44 -07:00
2012-01-03 22:52:40 -05:00
2012-01-03 22:54:07 -05:00
2011-11-02 12:53:43 +01:00
2012-01-03 22:53:07 -05:00
2012-01-03 22:54:07 -05:00
2012-01-03 22:52:40 -05:00