[kernel][vm] Improve efficiency of bidirectional clones

This change reduces the number of page allocations done by bidirectional
clones so that they are never less efficient than simply memcpying into
a new VMO. This is done by moving pages out of hidden VMOs when writing
to one of their children if the page is not accessible by the other
child.

Whether a page in a hidden VMO is 'accessible' to a particular child is
determined by a combination of two factors. First, a page is not
accessible if it lies outside the range of the hidden VMO which the
child can see. This is tracked by the existing parent offset and limit
values in the child. Second, if a page in the hidden VMO has already
been copied into a child, that page in the hidden VMO is no longer
accessible to that child. This is tracked by new 'split' bits in the
vm_page_t structure.

Test: existing vmo-clone2 core tests were written to cover this code,
and kstress has a test for hammering COW clones
ZX-1268 #comment [kernel][vm] Improve efficiency of bidirectional clones

Change-Id: Idbfcab1b684c12faa29499e3c9c78e478989a1ef
5 files changed
tree: 3dd08ab3c2441ed98ccf665e763c1add296a1b65
  1. .clang-format
  2. .clang-tidy
  3. .dir-locals.el
  4. .gitattributes
  5. .gitignore
  6. .gn
  7. AUTHORS
  8. BUILD.gn
  9. CODE_OF_CONDUCT.md
  10. CONTRIBUTING.md
  11. LICENSE
  12. OWNERS
  13. PATENTS
  14. README.md
  15. boards/
  16. build/
  17. buildtools/
  18. bundles/
  19. docs/
  20. examples/
  21. garnet/
  22. infra/
  23. peridot/
  24. products/
  25. rustfmt.toml
  26. scripts/
  27. sdk/
  28. src/
  29. third_party/
  30. tools/
  31. zircon/
README.md

Fuchsia

Pink + Purple == Fuchsia (a new operating system)

What is Fuchsia?

Fuchsia is a modular, capability-based operating system. Fuchsia runs on modern 64-bit Intel and ARM processors.

Fuchsia is an open source project with a code of conduct that we expect everyone who interacts with the project to respect.

How can I build and run Fuchsia?

See Getting Started.

Where can I learn more about Fuchsia?

See the documentation.