Dynamic I/O queue management

- Queue allocation is now separated from starting cache.
- Queue can be created and destroyed in runtime.
- All queue ops accept queue handle instead of queue id.
- Cache stores queues as list instead of array.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
Michal Mielewczyk
2019-02-15 08:12:00 -05:00
committed by Robert Baldyga
parent 1771228a46
commit e53944d472
38 changed files with 379 additions and 445 deletions

View File

@@ -128,54 +128,6 @@ struct ocf_data_ops {
void (*secure_erase)(ctx_data_t *dst);
};
/**
* @brief I/O queue operations
*/
struct ocf_queue_ops {
/**
* @brief Initialize I/O queue.
*
* This function should create worker, thread or any other queue
* processing related stuff specific to given environment.
*
* @param[in] q I/O queue to be initialized
*
* @retval 0 I/O queue has been initializaed successfully
* @retval Non-zero I/O queue initialization failure
*/
int (*init)(ocf_queue_t q);
/**
* @brief Kick I/O queue processing
*
* This function should inform worker, thread or any other queue
* processing mechanism, that there are new requests in queue to
* be processed. Processing requests inside current call is not allowed.
*
* @param[in] q I/O queue to be kicked
*/
void (*kick)(ocf_queue_t q);
/**
* @brief Kick I/O queue processing
*
* This function should inform worker, thread or any other queue
* processing mechanism, that there are new requests in queue to
* be processed. Kick function is allowed to process requests in current
* call
*
* @param[in] q I/O queue to be kicked
*/
void (*kick_sync)(ocf_queue_t q);
/**
* @brief Stop I/O queue
*
* @param[in] q I/O queue beeing stopped
*/
void (*stop)(ocf_queue_t q);
};
/**
* @brief Cleaner operations
*/
@@ -243,9 +195,6 @@ struct ocf_ctx_ops {
/* Context data operations */
struct ocf_data_ops data;
/* Queue operations */
struct ocf_queue_ops queue;
/* Cleaner operations */
struct ocf_cleaner_ops cleaner;