Re: [ 06/73] mm: compaction: introduce sync-light migration for use by compaction
On Tue, 2012-07-31 at 18:03 +0100, Mel Gorman wrote: > On Tue, Jul 31, 2012 at 06:00:51PM +0100, Mel Gorman wrote: > > On Tue, Jul 31, 2012 at 01:42:04PM -0300, Herton Ronaldo Krzesinski wrote: > > > On Tue, Jul 31, 2012 at 05:43:16AM +0100, Ben Hutchings wrote: > > > > 3.2-stable review patch. If anyone has any objections, please let me > > > > know. > > > > > > > > -- > > > > > > > > From: Mel Gorman > > > > > > > > commit a6bc32b899223a877f595ef9ddc1e89ead5072b8 upstream. > > > > > > We need also to pick recent fix dc32f63453f56d07a1073a697dcd843dd3098c09 > > > after > > > applying this one. > > > > > > > mel@machina:~/git-public/linux-2.6 > git remote update > > Fetching linux-next > > Fetching stable > > Fetching net-next > > mel@machina:~/git-public/linux-2.6 > git show > > dc32f63453f56d07a1073a697dcd843dd3098c09 > > fatal: bad object dc32f63453f56d07a1073a697dcd843dd3098c09 > > > > What commit is this, where did it come from and why is it needed? > > > > Bah, I'm an idiot. Yes, this patch should be included as well. OK, I've added this. Ben. -- Ben Hutchings Experience is directly proportional to the value of equipment destroyed. - Carolyn Scheppner signature.asc Description: This is a digitally signed message part
Re: [ 06/73] mm: compaction: introduce sync-light migration for use by compaction
On Tue, Jul 31, 2012 at 06:00:51PM +0100, Mel Gorman wrote: > On Tue, Jul 31, 2012 at 01:42:04PM -0300, Herton Ronaldo Krzesinski wrote: > > On Tue, Jul 31, 2012 at 05:43:16AM +0100, Ben Hutchings wrote: > > > 3.2-stable review patch. If anyone has any objections, please let me > > > know. > > > > > > -- > > > > > > From: Mel Gorman > > > > > > commit a6bc32b899223a877f595ef9ddc1e89ead5072b8 upstream. > > > > We need also to pick recent fix dc32f63453f56d07a1073a697dcd843dd3098c09 > > after > > applying this one. > > > > mel@machina:~/git-public/linux-2.6 > git remote update > Fetching linux-next > Fetching stable > Fetching net-next > mel@machina:~/git-public/linux-2.6 > git show > dc32f63453f56d07a1073a697dcd843dd3098c09 > fatal: bad object dc32f63453f56d07a1073a697dcd843dd3098c09 > > What commit is this, where did it come from and why is it needed? > Bah, I'm an idiot. Yes, this patch should be included as well. -- Mel Gorman SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [ 06/73] mm: compaction: introduce sync-light migration for use by compaction
On Tue, Jul 31, 2012 at 01:42:04PM -0300, Herton Ronaldo Krzesinski wrote: > On Tue, Jul 31, 2012 at 05:43:16AM +0100, Ben Hutchings wrote: > > 3.2-stable review patch. If anyone has any objections, please let me know. > > > > -- > > > > From: Mel Gorman > > > > commit a6bc32b899223a877f595ef9ddc1e89ead5072b8 upstream. > > We need also to pick recent fix dc32f63453f56d07a1073a697dcd843dd3098c09 after > applying this one. > mel@machina:~/git-public/linux-2.6 > git remote update Fetching linux-next Fetching stable Fetching net-next mel@machina:~/git-public/linux-2.6 > git show dc32f63453f56d07a1073a697dcd843dd3098c09 fatal: bad object dc32f63453f56d07a1073a697dcd843dd3098c09 What commit is this, where did it come from and why is it needed? -- Mel Gorman SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [ 06/73] mm: compaction: introduce sync-light migration for use by compaction
On Tue, Jul 31, 2012 at 05:43:16AM +0100, Ben Hutchings wrote: > 3.2-stable review patch. If anyone has any objections, please let me know. > > -- > > From: Mel Gorman > > commit a6bc32b899223a877f595ef9ddc1e89ead5072b8 upstream. We need also to pick recent fix dc32f63453f56d07a1073a697dcd843dd3098c09 after applying this one. > > Stable note: Not tracked in Buzilla. This was part of a series that > reduced interactivity stalls experienced when THP was enabled. > These stalls were particularly noticable when copying data > to a USB stick but the experiences for users varied a lot. > > 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. > > [aarca...@redhat.com: This patch is heavily based on Andrea's work] > [a...@linux-foundation.org: fix fs/nfs/write.c build] > [a...@linux-foundation.org: fix fs/btrfs/disk-io.c build] > Signed-off-by: Mel Gorman > Reviewed-by: Rik van Riel > Cc: Andrea Arcangeli > Cc: Minchan Kim > Cc: Dave Jones > Cc: Jan Kara > Cc: Andy Isaacson > Cc: Nai Xia > Cc: Johannes Weiner > Signed-off-by: Andrew Morton > Signed-off-by: Linus Torvalds > Signed-off-by: Ben Hutchings > --- > fs/btrfs/disk-io.c |5 +-- > fs/hugetlbfs/inode.c|2 +- > fs/nfs/internal.h |2 +- > fs/nfs/write.c |4 +-- > include/linux/fs.h |6 ++-- > include/linux/migrate.h | 23 +++--- > mm/compaction.c |2 +- > mm/memory-failure.c |2 +- > mm/memory_hotplug.c |2 +- > mm/mempolicy.c |2 +- > mm/migrate.c| 78 > ++- > 11 files changed, 76 insertions(+), 52 deletions(-) > > diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c > index 1375494..d852566 100644 > --- a/fs/btrfs/disk-io.c > +++ b/fs/btrfs/disk-io.c > @@ -872,7 +872,8 @@ static int btree_submit_bio_hook(struct inode *inode, int > rw, struct bio *bio, > > #ifdef CONFIG_MIGRATION > static int btree_migratepage(struct address_space *mapping, > - struct page *newpage, struct page *page, bool sync) > + struct page *newpage, struct page *page, > + enum migrate_mode mode) > { > /* >* we can't safely write a btree page from here, > @@ -887,7 +888,7 @@ static int btree_migratepage(struct address_space > *mapping, > if (page_has_private(page) && > !try_to_release_page(page, GFP_KERNEL)) > return -EAGAIN; > - return migrate_page(mapping, newpage, page, sync); > + return migrate_page(mapping, newpage, page, mode); > } > #endif > > diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c > index 06fd460..1e85a7a 100644 > --- a/fs/hugetlbfs/inode.c > +++ b/fs/hugetlbfs/inode.c > @@ -584,7 +584,7 @@ static int hugetlbfs_set_page_dirty(struct page *page) > > static int hugetlbfs_migrate_page(struct address_space *mapping, > struct page *newpage, struct page *page, > - bool sync) > + enum migrate_mode mode) > { > int rc; > > diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h > index 114398a..8102db9 100644 > --- a/fs/nfs/internal.h > +++ b/fs/nfs/internal.h > @@ -332,7 +332,7 @@ void nfs_commit_release_pages(struct nfs_write_data > *data); > > #ifdef CONFIG_MIGRATION > extern int nfs_migrate_page(struct address_space *, > - struct page *, struct page *, bool); > + struct page *, struct page *, enum migrate_mode); > #else > #define nfs_migrate_page NULL > #endif > diff --git a/fs/nfs/write.c b/fs/nfs/write.c > index 889e98b..834f0fe 100644 > --- a/fs/nfs/write.c > +++ b/fs/nfs/write.c > @@ -1688,7 +1688,7 @@ out_error: > > #ifdef CONFIG_MIGRATION > int nfs_migrate_page(struct address_space *mapping, struct page *newpage, > - struct page *page, bool sync) > + struct page *page, enum migrate_mode mode) > { > /* >* If PagePrivate is set, then the page is currently associated with > @@ -1703,7 +1703,7 @@ int nfs_migrate_page(struct address_space *mapping, > struct page *newpage, > > nfs_fscache_release_page(page, GFP_KERNEL); > > - return migrate_page(mapping, newpage, page, sync); > + return migrate_page(mapping, newpage, page, mode); > } > #endif > > diff --git a/include/linux/fs.h b/include/linux/fs.h > index b92b73d..e694bd4 100644 > --- a/include/linux/fs.h > +++
Re: [ 06/73] mm: compaction: introduce sync-light migration for use by compaction
On Tue, Jul 31, 2012 at 05:43:16AM +0100, Ben Hutchings wrote: 3.2-stable review patch. If anyone has any objections, please let me know. -- From: Mel Gorman mgor...@suse.de commit a6bc32b899223a877f595ef9ddc1e89ead5072b8 upstream. We need also to pick recent fix dc32f63453f56d07a1073a697dcd843dd3098c09 after applying this one. Stable note: Not tracked in Buzilla. This was part of a series that reduced interactivity stalls experienced when THP was enabled. These stalls were particularly noticable when copying data to a USB stick but the experiences for users varied a lot. 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. [aarca...@redhat.com: This patch is heavily based on Andrea's work] [a...@linux-foundation.org: fix fs/nfs/write.c build] [a...@linux-foundation.org: fix fs/btrfs/disk-io.c build] Signed-off-by: Mel Gorman mgor...@suse.de Reviewed-by: Rik van Riel r...@redhat.com Cc: Andrea Arcangeli aarca...@redhat.com Cc: Minchan Kim minchan@gmail.com Cc: Dave Jones da...@redhat.com Cc: Jan Kara j...@suse.cz Cc: Andy Isaacson a...@hexapodia.org Cc: Nai Xia nai@gmail.com Cc: Johannes Weiner jwei...@redhat.com Signed-off-by: Andrew Morton a...@linux-foundation.org Signed-off-by: Linus Torvalds torva...@linux-foundation.org Signed-off-by: Ben Hutchings b...@decadent.org.uk --- fs/btrfs/disk-io.c |5 +-- fs/hugetlbfs/inode.c|2 +- fs/nfs/internal.h |2 +- fs/nfs/write.c |4 +-- include/linux/fs.h |6 ++-- include/linux/migrate.h | 23 +++--- mm/compaction.c |2 +- mm/memory-failure.c |2 +- mm/memory_hotplug.c |2 +- mm/mempolicy.c |2 +- mm/migrate.c| 78 ++- 11 files changed, 76 insertions(+), 52 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 1375494..d852566 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -872,7 +872,8 @@ static int btree_submit_bio_hook(struct inode *inode, int rw, struct bio *bio, #ifdef CONFIG_MIGRATION static int btree_migratepage(struct address_space *mapping, - struct page *newpage, struct page *page, bool sync) + struct page *newpage, struct page *page, + enum migrate_mode mode) { /* * we can't safely write a btree page from here, @@ -887,7 +888,7 @@ static int btree_migratepage(struct address_space *mapping, if (page_has_private(page) !try_to_release_page(page, GFP_KERNEL)) return -EAGAIN; - return migrate_page(mapping, newpage, page, sync); + return migrate_page(mapping, newpage, page, mode); } #endif diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index 06fd460..1e85a7a 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c @@ -584,7 +584,7 @@ static int hugetlbfs_set_page_dirty(struct page *page) static int hugetlbfs_migrate_page(struct address_space *mapping, struct page *newpage, struct page *page, - bool sync) + enum migrate_mode mode) { int rc; diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index 114398a..8102db9 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h @@ -332,7 +332,7 @@ void nfs_commit_release_pages(struct nfs_write_data *data); #ifdef CONFIG_MIGRATION extern int nfs_migrate_page(struct address_space *, - struct page *, struct page *, bool); + struct page *, struct page *, enum migrate_mode); #else #define nfs_migrate_page NULL #endif diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 889e98b..834f0fe 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -1688,7 +1688,7 @@ out_error: #ifdef CONFIG_MIGRATION int nfs_migrate_page(struct address_space *mapping, struct page *newpage, - struct page *page, bool sync) + struct page *page, enum migrate_mode mode) { /* * If PagePrivate is set, then the page is currently associated with @@ -1703,7 +1703,7 @@ int nfs_migrate_page(struct address_space *mapping, struct page *newpage, nfs_fscache_release_page(page, GFP_KERNEL); - return migrate_page(mapping, newpage, page, sync); + return migrate_page(mapping, newpage, page, mode); } #endif diff --git
Re: [ 06/73] mm: compaction: introduce sync-light migration for use by compaction
On Tue, Jul 31, 2012 at 01:42:04PM -0300, Herton Ronaldo Krzesinski wrote: On Tue, Jul 31, 2012 at 05:43:16AM +0100, Ben Hutchings wrote: 3.2-stable review patch. If anyone has any objections, please let me know. -- From: Mel Gorman mgor...@suse.de commit a6bc32b899223a877f595ef9ddc1e89ead5072b8 upstream. We need also to pick recent fix dc32f63453f56d07a1073a697dcd843dd3098c09 after applying this one. mel@machina:~/git-public/linux-2.6 git remote update Fetching linux-next Fetching stable Fetching net-next mel@machina:~/git-public/linux-2.6 git show dc32f63453f56d07a1073a697dcd843dd3098c09 fatal: bad object dc32f63453f56d07a1073a697dcd843dd3098c09 What commit is this, where did it come from and why is it needed? -- Mel Gorman SUSE Labs -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [ 06/73] mm: compaction: introduce sync-light migration for use by compaction
On Tue, Jul 31, 2012 at 06:00:51PM +0100, Mel Gorman wrote: On Tue, Jul 31, 2012 at 01:42:04PM -0300, Herton Ronaldo Krzesinski wrote: On Tue, Jul 31, 2012 at 05:43:16AM +0100, Ben Hutchings wrote: 3.2-stable review patch. If anyone has any objections, please let me know. -- From: Mel Gorman mgor...@suse.de commit a6bc32b899223a877f595ef9ddc1e89ead5072b8 upstream. We need also to pick recent fix dc32f63453f56d07a1073a697dcd843dd3098c09 after applying this one. mel@machina:~/git-public/linux-2.6 git remote update Fetching linux-next Fetching stable Fetching net-next mel@machina:~/git-public/linux-2.6 git show dc32f63453f56d07a1073a697dcd843dd3098c09 fatal: bad object dc32f63453f56d07a1073a697dcd843dd3098c09 What commit is this, where did it come from and why is it needed? Bah, I'm an idiot. Yes, this patch should be included as well. -- Mel Gorman SUSE Labs -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [ 06/73] mm: compaction: introduce sync-light migration for use by compaction
On Tue, 2012-07-31 at 18:03 +0100, Mel Gorman wrote: On Tue, Jul 31, 2012 at 06:00:51PM +0100, Mel Gorman wrote: On Tue, Jul 31, 2012 at 01:42:04PM -0300, Herton Ronaldo Krzesinski wrote: On Tue, Jul 31, 2012 at 05:43:16AM +0100, Ben Hutchings wrote: 3.2-stable review patch. If anyone has any objections, please let me know. -- From: Mel Gorman mgor...@suse.de commit a6bc32b899223a877f595ef9ddc1e89ead5072b8 upstream. We need also to pick recent fix dc32f63453f56d07a1073a697dcd843dd3098c09 after applying this one. mel@machina:~/git-public/linux-2.6 git remote update Fetching linux-next Fetching stable Fetching net-next mel@machina:~/git-public/linux-2.6 git show dc32f63453f56d07a1073a697dcd843dd3098c09 fatal: bad object dc32f63453f56d07a1073a697dcd843dd3098c09 What commit is this, where did it come from and why is it needed? Bah, I'm an idiot. Yes, this patch should be included as well. OK, I've added this. Ben. -- Ben Hutchings Experience is directly proportional to the value of equipment destroyed. - Carolyn Scheppner signature.asc Description: This is a digitally signed message part