diff options
| author | Michal Hocko <[email protected]> | 2018-12-28 00:38:32 -0800 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2018-12-28 12:11:50 -0800 |
| commit | bb8965bd82fd4ed433a888f1383016ab3fa0d7de (patch) | |
| tree | 17c14a8e7e9249fd6ba64e1fcd76414aa1c62432 /scripts/const_structs.checkpatch | |
| parent | a85009c377929d119fad5a75a16c4b7198946603 (diff) | |
mm, memory_hotplug: deobfuscate migration part of offlining
Memory migration might fail during offlining and we keep retrying in that
case. This is currently obfuscated by goto retry loop. The code is hard
to follow and as a result it is even suboptimal becase each retry round
scans the full range from start_pfn even though we have successfully
scanned/migrated [start_pfn, pfn] range already. This is all only because
check_pages_isolated failure has to rescan the full range again.
De-obfuscate the migration retry loop by promoting it to a real for loop.
In fact remove the goto altogether by making it a proper double loop
(yeah, gotos are nasty in this specific case). In the end we will get a
slightly more optimal code which is better readable.
[[email protected]: reflow comments to 80 cols]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Michal Hocko <[email protected]>
Reviewed-by: David Hildenbrand <[email protected]>
Reviewed-by: Oscar Salvador <[email protected]>
Cc: Hugh Dickins <[email protected]>
Cc: Jan Kara <[email protected]>
Cc: Kirill A. Shutemov <[email protected]>
Cc: Pavel Tatashin <[email protected]>
Cc: William Kucharski <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'scripts/const_structs.checkpatch')
0 files changed, 0 insertions, 0 deletions