Commit fa81416
mm/migrate: remove MIGRATEPAGE_UNMAP
[ Upstream commit 95c2908f1a4fd608b1cdbb5acef3572e5d769e1c ]
migrate_folio_unmap() is the only user of MIGRATEPAGE_UNMAP. We want to
remove MIGRATEPAGE_* completely.
It's rather weird to have a generic MIGRATEPAGE_UNMAP, documented to be
returned from address-space callbacks, when it's only used for an internal
helper.
Let's start by having only a single "success" return value for
migrate_folio_unmap() -- 0 -- by moving the "folio was already freed"
check into the single caller.
There is a remaining comment for PG_isolated, which we renamed to
PG_movable_ops_isolated recently and forgot to update.
While we might still run into that case with zsmalloc, it's something we
want to get rid of soon. So let's just focus that optimization on real
folios only for now by excluding movable_ops pages. Note that concurrent
freeing can happen at any time and this "already freed" check is not
relevant for correctness.
[[email protected]: no need to pass "reason" to migrate_folio_unmap(), per Lance]
Link: https://lkml.kernel.org/r/[email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: David Hildenbrand <[email protected]>
Reviewed-by: Zi Yan <[email protected]>
Reviewed-by: Lance Yang <[email protected]>
Cc: Alistair Popple <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Benjamin LaHaise <[email protected]>
Cc: Byungchul Park <[email protected]>
Cc: Chris Mason <[email protected]>
Cc: Christian Brauner <[email protected]>
Cc: Christophe Leroy <[email protected]>
Cc: Dave Kleikamp <[email protected]>
Cc: David Sterba <[email protected]>
Cc: Eugenio Pé rez <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Gregory Price <[email protected]>
Cc: "Huang, Ying" <[email protected]>
Cc: Jan Kara <[email protected]>
Cc: Jason Wang <[email protected]>
Cc: Jerrin Shaji George <[email protected]>
Cc: Josef Bacik <[email protected]>
Cc: Joshua Hahn <[email protected]>
Cc: Madhavan Srinivasan <[email protected]>
Cc: Mathew Brost <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: "Michael S. Tsirkin" <[email protected]>
Cc: Minchan Kim <[email protected]>
Cc: Muchun Song <[email protected]>
Cc: Nicholas Piggin <[email protected]>
Cc: Oscar Salvador <[email protected]>
Cc: Rakie Kim <[email protected]>
Cc: Sergey Senozhatsky <[email protected]>
Cc: Xuan Zhuo <[email protected]>
Cc: Dave Kleikamp <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Stable-dep-of: 4ba5a8a7faa6 ("vmw_balloon: indicate success when effectively deflating during migration")
Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 7de6d6d commit fa81416
2 files changed
Lines changed: 22 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1189 | 1189 | | |
1190 | 1190 | | |
1191 | 1191 | | |
1192 | | - | |
| 1192 | + | |
1193 | 1193 | | |
1194 | 1194 | | |
1195 | 1195 | | |
| |||
1198 | 1198 | | |
1199 | 1199 | | |
1200 | 1200 | | |
1201 | | - | |
1202 | | - | |
1203 | | - | |
1204 | | - | |
1205 | | - | |
1206 | | - | |
1207 | | - | |
1208 | | - | |
1209 | | - | |
1210 | | - | |
1211 | 1201 | | |
1212 | 1202 | | |
1213 | 1203 | | |
| |||
1297 | 1287 | | |
1298 | 1288 | | |
1299 | 1289 | | |
1300 | | - | |
| 1290 | + | |
1301 | 1291 | | |
1302 | 1292 | | |
1303 | 1293 | | |
| |||
1327 | 1317 | | |
1328 | 1318 | | |
1329 | 1319 | | |
1330 | | - | |
| 1320 | + | |
1331 | 1321 | | |
1332 | 1322 | | |
1333 | 1323 | | |
| |||
1870 | 1860 | | |
1871 | 1861 | | |
1872 | 1862 | | |
| 1863 | + | |
| 1864 | + | |
| 1865 | + | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
| 1872 | + | |
| 1873 | + | |
| 1874 | + | |
| 1875 | + | |
| 1876 | + | |
| 1877 | + | |
1873 | 1878 | | |
1874 | | - | |
1875 | | - | |
| 1879 | + | |
1876 | 1880 | | |
1877 | 1881 | | |
1878 | | - | |
1879 | | - | |
1880 | | - | |
| 1882 | + | |
| 1883 | + | |
1881 | 1884 | | |
1882 | 1885 | | |
1883 | 1886 | | |
| |||
1927 | 1930 | | |
1928 | 1931 | | |
1929 | 1932 | | |
1930 | | - | |
1931 | | - | |
1932 | | - | |
1933 | | - | |
1934 | | - | |
| 1933 | + | |
1935 | 1934 | | |
1936 | 1935 | | |
1937 | 1936 | | |
| |||
0 commit comments