[PATCH v2] mm/migrate: Fix ref-count handling when !hugepage_migration_supported()

2017-05-25 Thread Punit Agrawal
On failing to migrate a page, soft_offline_huge_page() performs the necessary update to the hugepage ref-count. When !hugepage_migration_supported() , unmap_and_move_hugepage() also decrements the page ref-count for the hugepage. The combined behaviour leaves the ref-count in an inconsistent state.

Re: [PATCH] mm/migrate: Fix ref-count handling when !hugepage_migration_supported()

2017-05-25 Thread Punit Agrawal
Naoya Horiguchi writes: > On Wed, May 24, 2017 at 04:47:28PM +0100, Punit Agrawal wrote: >> On failing to migrate a page, soft_offline_huge_page() performs the >> necessary update to the hugepage ref-count. When >> !hugepage_migration_supported() , unmap_and_move_hugepage() also >> decrements the

Re: [PATCH] mm/migrate: Fix ref-count handling when !hugepage_migration_supported()

2017-05-25 Thread Punit Agrawal
Andrew Morton writes: > On Wed, 24 May 2017 16:47:28 +0100 Punit Agrawal > wrote: > >> On failing to migrate a page, soft_offline_huge_page() performs the >> necessary update to the hugepage ref-count. When >> !hugepage_migration_supported() , unmap_and_move_hugepage() also >> decrements the pa

Re: [PATCH] mm/migrate: Fix ref-count handling when !hugepage_migration_supported()

2017-05-24 Thread Naoya Horiguchi
On Wed, May 24, 2017 at 12:56:10PM -0700, Andrew Morton wrote: > On Wed, 24 May 2017 16:47:28 +0100 Punit Agrawal > wrote: > > > On failing to migrate a page, soft_offline_huge_page() performs the > > necessary update to the hugepage ref-count. When > > !hugepage_migration_supported() , unmap_an

Re: [PATCH] mm/migrate: Fix ref-count handling when !hugepage_migration_supported()

2017-05-24 Thread Naoya Horiguchi
On Wed, May 24, 2017 at 04:47:28PM +0100, Punit Agrawal wrote: > On failing to migrate a page, soft_offline_huge_page() performs the > necessary update to the hugepage ref-count. When > !hugepage_migration_supported() , unmap_and_move_hugepage() also > decrements the page ref-count for the hugepage

Re: mm/migrate: Fix ref-count handling when !hugepage_migration_supported()

2017-05-24 Thread Manoj Iyer
On Wed, 24 May 2017, Punit Agrawal wrote: On failing to migrate a page, soft_offline_huge_page() performs the necessary update to the hugepage ref-count. When !hugepage_migration_supported() , unmap_and_move_hugepage() also decrements the page ref-count for the hugepage. The combined behaviour l

Re: [PATCH] mm/migrate: Fix ref-count handling when !hugepage_migration_supported()

2017-05-24 Thread Andrew Morton
On Wed, 24 May 2017 16:47:28 +0100 Punit Agrawal wrote: > On failing to migrate a page, soft_offline_huge_page() performs the > necessary update to the hugepage ref-count. When > !hugepage_migration_supported() , unmap_and_move_hugepage() also > decrements the page ref-count for the hugepage. The

[PATCH] mm/migrate: Fix ref-count handling when !hugepage_migration_supported()

2017-05-24 Thread Punit Agrawal
On failing to migrate a page, soft_offline_huge_page() performs the necessary update to the hugepage ref-count. When !hugepage_migration_supported() , unmap_and_move_hugepage() also decrements the page ref-count for the hugepage. The combined behaviour leaves the ref-count in an inconsistent state.