[load-balancer] migrate fn, handle affine change.

Handle the case, exercised in the set_migrate_fn_test, where the
affinity of a thread changes when a migrate function is set. When
determining if we could stay on the old cpu until delayed migration
happened, in the old path we compared against available_mask in the
new path we also included affinity in that decision which was incorrect.

Also we should be comparing against last_cpu, not initial_cpu. It is not
correct to schedule a migration on a new thread so we add in the bypass
if the last_cpu is unset, which is the new thread case.

This brings us inline with scheduler.cc:650 which is the main flow.

Test: Ran k ut with the load-balancer enabled.
Change-Id: Ia83f47412b3bca861abfb2a4d19c8796a57bd5bd
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/405375
Reviewed-by: Nick Maniscalco <maniscalco@google.com>
Testability-Review: Nick Maniscalco <maniscalco@google.com>
Commit-Queue: Ed Coyne <edcoyne@google.com>
1 file changed
tree: ce023469c4453e89ccf7af9aa48dee39d9d819b7
  1. boards/
  2. build/
  3. bundles/
  4. cts/
  5. docs/
  6. examples/
  7. garnet/
  8. products/
  9. scripts/
  10. sdk/
  11. src/
  12. third_party/
  13. tools/
  14. zircon/
  15. .clang-format
  16. .clang-tidy
  17. .gitattributes
  18. .gitignore
  19. .gn
  20. .style.yapf
  21. AUTHORS
  22. BUILD.gn
  23. CODE_OF_CONDUCT.md
  24. CONTRIBUTING.md
  25. LICENSE
  26. OWNERS
  27. PATENTS
  28. README.md
  29. 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 fuchsia.dev.