haiku/headers
Michael Lotz 4e2b49bc0c kernel/vm: Implement swap adoption for cut_area middle case.
Rename MovePageRange to Adopt and group it with Resize/Rebase as it
covers the third, middle cut case.

Implement VMAnonymousCache::Adopt() to actually adopt swap pages. This
has to recreate swap blocks instead of taking them over from the source
cache as the cut offset or base offset between the caches may not be
swap block aligned. This means that adoption may fail due to memory
shortage in allocating the swap blocks.

For the middle cut case it is therefore now possible to have the adopt
fail in which case the previous cache restore logic is applied. Since
the readoption of the pages from the second cache can fail for the same
reason, there is a slight chance that we can't restore and lose pages.
For now, just panic in such a case and add a TODO to free memory and
retry.

Change-Id: I9a661f00c8f03bbbea2fe6dee90371c68d7951e6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2588
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-08 21:56:56 +00:00
..
build configure & build: Add basic support for building with MSYS. 2020-05-03 13:24:26 -04:00
compatibility Add missing include in bsd/sys/link_elf.h 2019-09-18 03:40:47 +00:00
config ARM64: Initial changes so we can compile GCC toolchain 2019-08-30 19:05:16 +00:00
cpp
glibc
libs agg: fix build. 2020-01-22 19:25:16 +01:00
os Remove MouseDownThread and its usages 2020-05-07 22:08:23 +00:00
posix Optimize ffs() implementation 2020-05-08 14:01:53 +00:00
private kernel/vm: Implement swap adoption for cut_area middle case. 2020-05-08 21:56:56 +00:00
tools