* [PATCH] mm: fix wrong argument of migrate_huge_pages() in soft_offline_huge_page()
@ 2012-07-17 17:01 ` Joonsoo Kim
0 siblings, 0 replies; 10+ messages in thread
From: Joonsoo Kim @ 2012-07-17 17:01 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel, linux-mm, Joonsoo Kim, Christoph Lameter, Mel Gorman
Commit a6bc32b899223a877f595ef9ddc1e89ead5072b8 ('mm: compaction: introduce
sync-light migration for use by compaction') change declaration of
migrate_pages() and migrate_huge_pages().
But, it miss changing argument of migrate_huge_pages()
in soft_offline_huge_page(). In this case, we should call with MIGRATE_SYNC.
So change it.
Additionally, there is mismatch between type of argument and function
declaration for migrate_pages(). So fix this simple case, too.
Signed-off-by: Joonsoo Kim <js1304@gmail.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Mel Gorman <mgorman@suse.de>
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index ab1e714..afde561 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -1431,8 +1431,8 @@ static int soft_offline_huge_page(struct page *page, int flags)
/* Keep page count to indicate a given hugepage is isolated. */
list_add(&hpage->lru, &pagelist);
- ret = migrate_huge_pages(&pagelist, new_page, MPOL_MF_MOVE_ALL, 0,
- true);
+ ret = migrate_huge_pages(&pagelist, new_page, MPOL_MF_MOVE_ALL, false,
+ MIGRATE_SYNC);
if (ret) {
struct page *page1, *page2;
list_for_each_entry_safe(page1, page2, &pagelist, lru)
@@ -1561,7 +1561,7 @@ int soft_offline_page(struct page *page, int flags)
page_is_file_cache(page));
list_add(&page->lru, &pagelist);
ret = migrate_pages(&pagelist, new_page, MPOL_MF_MOVE_ALL,
- 0, MIGRATE_SYNC);
+ false, MIGRATE_SYNC);
if (ret) {
putback_lru_pages(&pagelist);
pr_info("soft offline: %#lx: migration failed %d, type %lx\n",
--
1.7.9.5
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH] mm: fix wrong argument of migrate_huge_pages() in soft_offline_huge_page()
@ 2012-07-17 17:01 ` Joonsoo Kim
0 siblings, 0 replies; 10+ messages in thread
From: Joonsoo Kim @ 2012-07-17 17:01 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel, linux-mm, Joonsoo Kim, Christoph Lameter, Mel Gorman
Commit a6bc32b899223a877f595ef9ddc1e89ead5072b8 ('mm: compaction: introduce
sync-light migration for use by compaction') change declaration of
migrate_pages() and migrate_huge_pages().
But, it miss changing argument of migrate_huge_pages()
in soft_offline_huge_page(). In this case, we should call with MIGRATE_SYNC.
So change it.
Additionally, there is mismatch between type of argument and function
declaration for migrate_pages(). So fix this simple case, too.
Signed-off-by: Joonsoo Kim <js1304@gmail.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Mel Gorman <mgorman@suse.de>
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index ab1e714..afde561 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -1431,8 +1431,8 @@ static int soft_offline_huge_page(struct page *page, int flags)
/* Keep page count to indicate a given hugepage is isolated. */
list_add(&hpage->lru, &pagelist);
- ret = migrate_huge_pages(&pagelist, new_page, MPOL_MF_MOVE_ALL, 0,
- true);
+ ret = migrate_huge_pages(&pagelist, new_page, MPOL_MF_MOVE_ALL, false,
+ MIGRATE_SYNC);
if (ret) {
struct page *page1, *page2;
list_for_each_entry_safe(page1, page2, &pagelist, lru)
@@ -1561,7 +1561,7 @@ int soft_offline_page(struct page *page, int flags)
page_is_file_cache(page));
list_add(&page->lru, &pagelist);
ret = migrate_pages(&pagelist, new_page, MPOL_MF_MOVE_ALL,
- 0, MIGRATE_SYNC);
+ false, MIGRATE_SYNC);
if (ret) {
putback_lru_pages(&pagelist);
pr_info("soft offline: %#lx: migration failed %d, type %lx\n",
--
1.7.9.5
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] mm: fix wrong argument of migrate_huge_pages() in soft_offline_huge_page()
2012-07-17 17:01 ` Joonsoo Kim
@ 2012-07-17 20:42 ` David Rientjes
-1 siblings, 0 replies; 10+ messages in thread
From: David Rientjes @ 2012-07-17 20:42 UTC (permalink / raw)
To: Joonsoo Kim; +Cc: akpm, linux-kernel, linux-mm, Christoph Lameter, Mel Gorman
On Wed, 18 Jul 2012, Joonsoo Kim wrote:
> Commit a6bc32b899223a877f595ef9ddc1e89ead5072b8 ('mm: compaction: introduce
> sync-light migration for use by compaction') change declaration of
> migrate_pages() and migrate_huge_pages().
> But, it miss changing argument of migrate_huge_pages()
> in soft_offline_huge_page(). In this case, we should call with MIGRATE_SYNC.
> So change it.
>
> Additionally, there is mismatch between type of argument and function
> declaration for migrate_pages(). So fix this simple case, too.
>
> Signed-off-by: Joonsoo Kim <js1304@gmail.com>
Acked-by: David Rientjes <rientjes@google.com>
Should be cc'd to stable for 3.3+.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mm: fix wrong argument of migrate_huge_pages() in soft_offline_huge_page()
@ 2012-07-17 20:42 ` David Rientjes
0 siblings, 0 replies; 10+ messages in thread
From: David Rientjes @ 2012-07-17 20:42 UTC (permalink / raw)
To: Joonsoo Kim; +Cc: akpm, linux-kernel, linux-mm, Christoph Lameter, Mel Gorman
On Wed, 18 Jul 2012, Joonsoo Kim wrote:
> Commit a6bc32b899223a877f595ef9ddc1e89ead5072b8 ('mm: compaction: introduce
> sync-light migration for use by compaction') change declaration of
> migrate_pages() and migrate_huge_pages().
> But, it miss changing argument of migrate_huge_pages()
> in soft_offline_huge_page(). In this case, we should call with MIGRATE_SYNC.
> So change it.
>
> Additionally, there is mismatch between type of argument and function
> declaration for migrate_pages(). So fix this simple case, too.
>
> Signed-off-by: Joonsoo Kim <js1304@gmail.com>
Acked-by: David Rientjes <rientjes@google.com>
Should be cc'd to stable for 3.3+.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mm: fix wrong argument of migrate_huge_pages() in soft_offline_huge_page()
2012-07-17 20:42 ` David Rientjes
@ 2012-07-17 20:49 ` Andrew Morton
-1 siblings, 0 replies; 10+ messages in thread
From: Andrew Morton @ 2012-07-17 20:49 UTC (permalink / raw)
To: David Rientjes
Cc: Joonsoo Kim, linux-kernel, linux-mm, Christoph Lameter, Mel Gorman
On Tue, 17 Jul 2012 13:42:23 -0700 (PDT)
David Rientjes <rientjes@google.com> wrote:
> On Wed, 18 Jul 2012, Joonsoo Kim wrote:
>
> > Commit a6bc32b899223a877f595ef9ddc1e89ead5072b8 ('mm: compaction: introduce
> > sync-light migration for use by compaction') change declaration of
> > migrate_pages() and migrate_huge_pages().
> > But, it miss changing argument of migrate_huge_pages()
> > in soft_offline_huge_page(). In this case, we should call with MIGRATE_SYNC.
> > So change it.
> >
> > Additionally, there is mismatch between type of argument and function
> > declaration for migrate_pages(). So fix this simple case, too.
> >
> > Signed-off-by: Joonsoo Kim <js1304@gmail.com>
>
> Acked-by: David Rientjes <rientjes@google.com>
>
> Should be cc'd to stable for 3.3+.
Well, why? I'm suspecting a switch from MIGRATE_SYNC_LIGHT to
MIGRATE_SYNC will have no discernable effect. Unless it triggers hitherto
unknkown about deadlocks...
For a -stable backport we should have a description of the end-user
visible effects of the bug. This changelog lacked such a description.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mm: fix wrong argument of migrate_huge_pages() in soft_offline_huge_page()
@ 2012-07-17 20:49 ` Andrew Morton
0 siblings, 0 replies; 10+ messages in thread
From: Andrew Morton @ 2012-07-17 20:49 UTC (permalink / raw)
To: David Rientjes
Cc: Joonsoo Kim, linux-kernel, linux-mm, Christoph Lameter, Mel Gorman
On Tue, 17 Jul 2012 13:42:23 -0700 (PDT)
David Rientjes <rientjes@google.com> wrote:
> On Wed, 18 Jul 2012, Joonsoo Kim wrote:
>
> > Commit a6bc32b899223a877f595ef9ddc1e89ead5072b8 ('mm: compaction: introduce
> > sync-light migration for use by compaction') change declaration of
> > migrate_pages() and migrate_huge_pages().
> > But, it miss changing argument of migrate_huge_pages()
> > in soft_offline_huge_page(). In this case, we should call with MIGRATE_SYNC.
> > So change it.
> >
> > Additionally, there is mismatch between type of argument and function
> > declaration for migrate_pages(). So fix this simple case, too.
> >
> > Signed-off-by: Joonsoo Kim <js1304@gmail.com>
>
> Acked-by: David Rientjes <rientjes@google.com>
>
> Should be cc'd to stable for 3.3+.
Well, why? I'm suspecting a switch from MIGRATE_SYNC_LIGHT to
MIGRATE_SYNC will have no discernable effect. Unless it triggers hitherto
unknkown about deadlocks...
For a -stable backport we should have a description of the end-user
visible effects of the bug. This changelog lacked such a description.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mm: fix wrong argument of migrate_huge_pages() in soft_offline_huge_page()
2012-07-17 20:49 ` Andrew Morton
@ 2012-07-17 22:29 ` David Rientjes
-1 siblings, 0 replies; 10+ messages in thread
From: David Rientjes @ 2012-07-17 22:29 UTC (permalink / raw)
To: Andrew Morton
Cc: Joonsoo Kim, linux-kernel, linux-mm, Christoph Lameter, Mel Gorman
On Tue, 17 Jul 2012, Andrew Morton wrote:
> > > Commit a6bc32b899223a877f595ef9ddc1e89ead5072b8 ('mm: compaction: introduce
> > > sync-light migration for use by compaction') change declaration of
> > > migrate_pages() and migrate_huge_pages().
> > > But, it miss changing argument of migrate_huge_pages()
> > > in soft_offline_huge_page(). In this case, we should call with MIGRATE_SYNC.
> > > So change it.
> > >
> > > Additionally, there is mismatch between type of argument and function
> > > declaration for migrate_pages(). So fix this simple case, too.
> > >
> > > Signed-off-by: Joonsoo Kim <js1304@gmail.com>
> >
> > Acked-by: David Rientjes <rientjes@google.com>
> >
> > Should be cc'd to stable for 3.3+.
>
> Well, why? I'm suspecting a switch from MIGRATE_SYNC_LIGHT to
> MIGRATE_SYNC will have no discernable effect. Unless it triggers hitherto
> unknkown about deadlocks...
>
> For a -stable backport we should have a description of the end-user
> visible effects of the bug. This changelog lacked such a description.
>
I would put this:
MIGRATE_SYNC_LIGHT will not aggressively attempt to defragment memory when
allocating hugepages for migration with MIGRATE_SYNC_LIGHT, such as not
defragmenting dirty pages, so MADV_SOFT_OFFLINE and
/sys/devices/system/memory/soft_offline_page would be significantly
less successful without this patch.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mm: fix wrong argument of migrate_huge_pages() in soft_offline_huge_page()
@ 2012-07-17 22:29 ` David Rientjes
0 siblings, 0 replies; 10+ messages in thread
From: David Rientjes @ 2012-07-17 22:29 UTC (permalink / raw)
To: Andrew Morton
Cc: Joonsoo Kim, linux-kernel, linux-mm, Christoph Lameter, Mel Gorman
On Tue, 17 Jul 2012, Andrew Morton wrote:
> > > Commit a6bc32b899223a877f595ef9ddc1e89ead5072b8 ('mm: compaction: introduce
> > > sync-light migration for use by compaction') change declaration of
> > > migrate_pages() and migrate_huge_pages().
> > > But, it miss changing argument of migrate_huge_pages()
> > > in soft_offline_huge_page(). In this case, we should call with MIGRATE_SYNC.
> > > So change it.
> > >
> > > Additionally, there is mismatch between type of argument and function
> > > declaration for migrate_pages(). So fix this simple case, too.
> > >
> > > Signed-off-by: Joonsoo Kim <js1304@gmail.com>
> >
> > Acked-by: David Rientjes <rientjes@google.com>
> >
> > Should be cc'd to stable for 3.3+.
>
> Well, why? I'm suspecting a switch from MIGRATE_SYNC_LIGHT to
> MIGRATE_SYNC will have no discernable effect. Unless it triggers hitherto
> unknkown about deadlocks...
>
> For a -stable backport we should have a description of the end-user
> visible effects of the bug. This changelog lacked such a description.
>
I would put this:
MIGRATE_SYNC_LIGHT will not aggressively attempt to defragment memory when
allocating hugepages for migration with MIGRATE_SYNC_LIGHT, such as not
defragmenting dirty pages, so MADV_SOFT_OFFLINE and
/sys/devices/system/memory/soft_offline_page would be significantly
less successful without this patch.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mm: fix wrong argument of migrate_huge_pages() in soft_offline_huge_page()
2012-07-17 22:29 ` David Rientjes
@ 2012-07-18 8:15 ` Aneesh Kumar K.V
-1 siblings, 0 replies; 10+ messages in thread
From: Aneesh Kumar K.V @ 2012-07-18 8:15 UTC (permalink / raw)
To: David Rientjes, Andrew Morton
Cc: Joonsoo Kim, linux-kernel, linux-mm, Christoph Lameter, Mel Gorman
David Rientjes <rientjes@google.com> writes:
> On Tue, 17 Jul 2012, Andrew Morton wrote:
>
>> > > Commit a6bc32b899223a877f595ef9ddc1e89ead5072b8 ('mm: compaction: introduce
>> > > sync-light migration for use by compaction') change declaration of
>> > > migrate_pages() and migrate_huge_pages().
>> > > But, it miss changing argument of migrate_huge_pages()
>> > > in soft_offline_huge_page(). In this case, we should call with MIGRATE_SYNC.
>> > > So change it.
>> > >
>> > > Additionally, there is mismatch between type of argument and function
>> > > declaration for migrate_pages(). So fix this simple case, too.
>> > >
>> > > Signed-off-by: Joonsoo Kim <js1304@gmail.com>
>> >
>> > Acked-by: David Rientjes <rientjes@google.com>
>> >
>> > Should be cc'd to stable for 3.3+.
>>
>> Well, why? I'm suspecting a switch from MIGRATE_SYNC_LIGHT to
>> MIGRATE_SYNC will have no discernable effect. Unless it triggers hitherto
>> unknkown about deadlocks...
>>
>> For a -stable backport we should have a description of the end-user
>> visible effects of the bug. This changelog lacked such a description.
>>
>
> I would put this:
>
> MIGRATE_SYNC_LIGHT will not aggressively attempt to defragment memory when
> allocating hugepages for migration with MIGRATE_SYNC_LIGHT, such as not
> defragmenting dirty pages, so MADV_SOFT_OFFLINE and
> /sys/devices/system/memory/soft_offline_page would be significantly
> less successful without this patch.
Is that true with hugetlb pages ? hugetlbfs_migrate_page doesn't seem to
use the mode argument at all. We do look at MIGRATE_SYNC if we fail to
get page lock, but other than that do we look at mode argument for
hugetlb pages ?
-aneesh
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mm: fix wrong argument of migrate_huge_pages() in soft_offline_huge_page()
@ 2012-07-18 8:15 ` Aneesh Kumar K.V
0 siblings, 0 replies; 10+ messages in thread
From: Aneesh Kumar K.V @ 2012-07-18 8:15 UTC (permalink / raw)
To: David Rientjes, Andrew Morton
Cc: Joonsoo Kim, linux-kernel, linux-mm, Christoph Lameter, Mel Gorman
David Rientjes <rientjes@google.com> writes:
> On Tue, 17 Jul 2012, Andrew Morton wrote:
>
>> > > Commit a6bc32b899223a877f595ef9ddc1e89ead5072b8 ('mm: compaction: introduce
>> > > sync-light migration for use by compaction') change declaration of
>> > > migrate_pages() and migrate_huge_pages().
>> > > But, it miss changing argument of migrate_huge_pages()
>> > > in soft_offline_huge_page(). In this case, we should call with MIGRATE_SYNC.
>> > > So change it.
>> > >
>> > > Additionally, there is mismatch between type of argument and function
>> > > declaration for migrate_pages(). So fix this simple case, too.
>> > >
>> > > Signed-off-by: Joonsoo Kim <js1304@gmail.com>
>> >
>> > Acked-by: David Rientjes <rientjes@google.com>
>> >
>> > Should be cc'd to stable for 3.3+.
>>
>> Well, why? I'm suspecting a switch from MIGRATE_SYNC_LIGHT to
>> MIGRATE_SYNC will have no discernable effect. Unless it triggers hitherto
>> unknkown about deadlocks...
>>
>> For a -stable backport we should have a description of the end-user
>> visible effects of the bug. This changelog lacked such a description.
>>
>
> I would put this:
>
> MIGRATE_SYNC_LIGHT will not aggressively attempt to defragment memory when
> allocating hugepages for migration with MIGRATE_SYNC_LIGHT, such as not
> defragmenting dirty pages, so MADV_SOFT_OFFLINE and
> /sys/devices/system/memory/soft_offline_page would be significantly
> less successful without this patch.
Is that true with hugetlb pages ? hugetlbfs_migrate_page doesn't seem to
use the mode argument at all. We do look at MIGRATE_SYNC if we fail to
get page lock, but other than that do we look at mode argument for
hugetlb pages ?
-aneesh
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-07-18 8:15 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-17 17:01 [PATCH] mm: fix wrong argument of migrate_huge_pages() in soft_offline_huge_page() Joonsoo Kim
2012-07-17 17:01 ` Joonsoo Kim
2012-07-17 20:42 ` David Rientjes
2012-07-17 20:42 ` David Rientjes
2012-07-17 20:49 ` Andrew Morton
2012-07-17 20:49 ` Andrew Morton
2012-07-17 22:29 ` David Rientjes
2012-07-17 22:29 ` David Rientjes
2012-07-18 8:15 ` Aneesh Kumar K.V
2012-07-18 8:15 ` Aneesh Kumar K.V
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.