[roll] Roll fuchsia [kernel] LazyOwnedWaitQueue, OwnedWaitQueuePool.
This adds an ante/ticket system for lazily acquiring an
OwnedWaitQueue. This will allow types like Mutex that
currently hold an OWQ inline to store a much smaller
LazyOwnedWaitQueue that will only be populated when
a thread actually needs to block.
Follow-up changes will integrate this pool with Thread
and Mutex.
This implementation deviates from previously socialized
designs in two ways:
1. the pool only grows, never shrinks
2. the pool uses a DoublyLinkedList
(1) is an initial approach that allows us to avoid UAF
concerns without a more sophisticated synchronization
approach for freeing OWQs like RCU, hazard pointers, etc.
(2) simplifies the implementation a good bit and saves
some memory. We ensure an OWQ is in xor a thread's list
or the global pool. It also allows us to avoid contending
on the "head" OWQ's lock when acquiring one as part of
an optimistic concurrency pattern.
Test: fx run-boot-test kernel-unittests-boot-test \
--kernel-unittest owned_wait_queue_pool
Run-All-Tests: true
Original-Bug: 42147891
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1477583
Original-Revision: 0c0fe4f3fe8a2729de27232dcef519af4b8dc655
GitOrigin-RevId: 7e3719d177d305d301b5e815d2566b6911c165a9
Change-Id: I4b9dd37b41d778cb15299316ea93f4a6903efe13
This repository contains Fuchsia's Global Integration manifest files.
All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.
Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance in one of the communication channels documented at get involved.
First install Jiri.
Next run:
$ jiri init $ jiri import minimal https://fuchsia.googlesource.com/integration $ jiri update
Third party projects should have their own subdirectory in ./third_party.