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