open-cas-linux/modules/cas_cache
Michal Mielewczyk d483951ebe Free thread memory after it is stopped.
After marking thread as ready to stop, CAS was waiting this for thread to exit
out of main execution loop (in _cas_io_queue_thread()). In case of management
queue it lead to deadlock because both stoping queue and main execution loop was
performed in the same execution context.

Since freeing memory is the only operation after stopping thread, it can be
moved just after the main thread loop. After this little reordering,
synchronising between _cas_stop_thread() and _cas_io_queue_thread() in no longer
needed, and no deadlock will occur.

This change is needed to put management qeueue from completion context. Without
this cachnge, there will be no possiblitiy to stop cache from completion context
and to make rollback.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-01-02 09:22:13 -05:00
..
utils Use vmalloc instead of kmalloc in mem pools 2019-10-23 16:04:18 -04:00
volume atomic: use proper step_size in sub io allocation 2019-12-23 11:11:08 +01:00
.gitignore Initial commit 2019-03-29 08:45:50 +01:00
cas_cache.h OCF update 2019-10-01 10:32:03 +02:00
classifier_defs.h Introducing a new IO class caching rule - file name prefix 2019-12-27 14:08:32 +01:00
classifier.c Introducing a new IO class caching rule - file name prefix 2019-12-27 14:08:32 +01:00
classifier.h Initial commit 2019-03-29 08:45:50 +01:00
context.c Relax allocations requirements 2019-10-23 16:04:27 -04:00
context.h Use new functions for creating and destroying ocf_ctx 2019-05-24 18:24:51 +02:00
control.c Initial commit 2019-03-29 08:45:50 +01:00
control.h Initial commit 2019-03-29 08:45:50 +01:00
layer_cache_management.c Additional null check when starting cache instance 2020-01-02 09:22:13 -05:00
layer_cache_management.h Adapt to new OCF PP param set/get API. 2019-10-01 06:54:32 -04:00
layer_upgrade.c Adapt to new OCF PP param set/get API. 2019-10-01 06:54:32 -04:00
layer_upgrade.h Initial commit 2019-03-29 08:45:50 +01:00
linux_kernel_version.h Add blk-mq.h include to linux_kernel_version.h 2019-09-26 16:16:27 +02:00
main.c Fix legacy error messages. 2020-01-02 09:22:13 -05:00
Makefile Initial commit 2019-03-29 08:45:50 +01:00
ocf_env_headers.h Initial commit 2019-03-29 08:45:50 +01:00
ocf_env.c Relax allocations requirements 2019-10-23 16:04:27 -04:00
ocf_env.h Relax allocations requirements 2019-10-23 16:04:27 -04:00
service_ui_ioctl.c OCF update 2019-10-01 10:32:03 +02:00
service_ui_ioctl.h Initial commit 2019-03-29 08:45:50 +01:00
threads.c Free thread memory after it is stopped. 2020-01-02 09:22:13 -05:00
threads.h Added possibility to disable cleaner thread. 2019-05-10 09:47:53 -04:00