![]() Queue settle is a mechanism to wait for all OCF processing on a given queue to finish. In some tests simply waiting for I/O to finish is not enough. Most notably some statistics are potentially incremented after user triggered I/O is finished. This is due to asynchronous nature of I/O operations and OCF approach to statistics update, where only eventual consistency is guaranteed without explicit mechanism available to query whether the final state is reached yet. However it is fully in the adapter power to determine this, as OCF executes in context of API calls from the adapter (like I/O submission, ocf_queue_run, ocf_cleaner_run, management operations) and I/O completion callbacks. Queue settle is a mechanism to assure ocf_queue_run is not being executed by the thread associated with a queue. With queue settle mechanism it is straightforward for the adapter to wait for cache statistics to reach fixed values: 1. wait for all I/O to OCF to finish 2. settle all I/O queues 3. make sure background cleaner is not active Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com> |
||
---|---|---|
.. | ||
types | ||
wrappers | ||
__init__.py | ||
ocf.py | ||
rio.py | ||
utils.py |