[kernel][vm] Hold lock over VmCowPages::Commit

This redistributes the commit logic between VmCowPages and
VmObjectPaged. The goal is to move the top level retry loop that has to
wait on page requests with the lock dropped in VmObjectPaged, and have
the VmCowPages perform only the section that can be done with the lock
held.

Motivation for this is that later we would like the cow_pages_ link
in VmObjectPaged to be modifiable to point to different VmCowPages. If
VmCowPages would be dropping the lock mid operation then it could
potentially cease being the linked object, and  when the lock is
reacquired be acting on the wrong VmCowPages. Dropping the lock in
VmObjectPaged ensures that after we re-acquire we will use any
potentially updated cow_pages_ link.

Change-Id: I8ab81aa621511013b2846b47fa460fd6d7be1048
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/437345
Commit-Queue: Adrian Danis <adanis@google.com>
Reviewed-by: Rasha Eqbal <rashaeqbal@google.com>
Testability-Review: Rasha Eqbal <rashaeqbal@google.com>
4 files changed
tree: 8edfb1a5330096d21db4052b6282b4c688727b72
  1. boards/
  2. build/
  3. bundles/
  4. docs/
  5. examples/
  6. garnet/
  7. products/
  8. scripts/
  9. sdk/
  10. src/
  11. third_party/
  12. tools/
  13. zircon/
  14. .clang-format
  15. .clang-tidy
  16. .gitattributes
  17. .gitignore
  18. .gn
  19. .style.yapf
  20. AUTHORS
  21. BUILD.gn
  22. CODE_OF_CONDUCT.md
  23. CONTRIBUTING.md
  24. LICENSE
  25. OWNERS
  26. PATENTS
  27. README.md
  28. 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.

Read more about Fuchsia's principles.

How can I build and run Fuchsia?

See Getting Started.

Where can I learn more about Fuchsia?

See fuchsia.dev.