Commit aa05a04
vmw_balloon: indicate success when effectively deflating during migration
[ Upstream commit 4ba5a8a7faa647ada8eae61a36517cf369f5bbe4 ]
When migrating a balloon page, we first deflate the old page to then
inflate the new page.
However, if inflating the new page succeeded, we effectively deflated the
old page, reducing the balloon size.
In that case, the migration actually worked: similar to migrating+
immediately deflating the new page. The old page will be freed back to
the buddy.
Right now, the core will leave the page be marked as isolated (as we
returned an error). When later trying to putback that page, we will run
into the WARN_ON_ONCE() in balloon_page_putback().
That handling was changed in commit 3544c4f ("mm/balloon_compaction:
stop using __ClearPageMovable()"); before that change, we would have
tolerated that way of handling it.
To fix it, let's just return 0 in that case, making the core effectively
just clear the "isolated" flag + freeing it back to the buddy as if the
migration succeeded. Note that the new page will also get freed when the
core puts the last reference.
Note that this also makes it all be more consistent: we will no longer
unisolate the page in the balloon driver while keeping it marked as being
isolated in migration core.
This was found by code inspection.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 3544c4f ("mm/balloon_compaction: stop using __ClearPageMovable()")
Signed-off-by: David Hildenbrand <[email protected]>
Cc: Jerrin Shaji George <[email protected]>
Cc: Broadcom internal kernel review list <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent df5c32a commit aa05a04
1 file changed
Lines changed: 3 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1737 | 1737 | | |
1738 | 1738 | | |
1739 | 1739 | | |
1740 | | - | |
| 1740 | + | |
1741 | 1741 | | |
1742 | 1742 | | |
1743 | 1743 | | |
| |||
1796 | 1796 | | |
1797 | 1797 | | |
1798 | 1798 | | |
1799 | | - | |
| 1799 | + | |
1800 | 1800 | | |
1801 | 1801 | | |
1802 | | - | |
1803 | 1802 | | |
1804 | 1803 | | |
1805 | 1804 | | |
1806 | 1805 | | |
1807 | 1806 | | |
1808 | 1807 | | |
1809 | | - | |
1810 | 1808 | | |
1811 | 1809 | | |
1812 | 1810 | | |
| |||
1817 | 1815 | | |
1818 | 1816 | | |
1819 | 1817 | | |
1820 | | - | |
| 1818 | + | |
1821 | 1819 | | |
1822 | 1820 | | |
1823 | 1821 | | |
| |||
0 commit comments