Since kernel 5.7 kallsyms_on_each_symbol() is not available.
NOTE: This affects ability to perform upgrade in flight on kernels 5.7+.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This counter is not accurate (missing required memory barrier
to avoid unwanted behavior due to processor optimizations)
and performance gain is not clear - generally global
atomic variables are something we would like to avoid
going forward.
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
Since commit 8b3238cabd50e27 in linux kernel removed blk_bidi_rq() marco, it
has to be wrapped in CAS `configure` script
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
Since there is no kernel-kernel api available to communicate
with nvme driver it is more convenient to use some nvme-dedicated
software (e.g. nvme-cli) to manage nvme devices.
It is even not possible to format nvme device with CAS using current
implementation on newest kernels.
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
To avoid logging the same message each time _cache_mngt_create_exported_object()
is called, print error message within it.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
To avoid logging the same message each time block_dev_activate_exported_object()
is called, print error message within it.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
In case of error `blk_mq_init_queue()` does not return NULL, but
`ERR_PTR(error_code)` instead.
`IS_ERR_OR_NULL()` should be used to check if `blk_mq_init_queue()` actually
failed.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
If cache is restored after upgrade, NULL is passed instead of
`struct kcas_start_cache`. This leads to null pointer dereference.
To prevent null pointer dereference, `struct kcas_start_cache` is tested before
each use
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
If cache is initialized successfully, `struct _cache_mngt_attach_context` might
be freed in `cache_mngt_init_instance()`. In such case pointer to rollback
thread can't be accessed and thread can't be stopped.
To prevent such scenario pointer should be kept in separate variable.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
Purge invalidates all cache lines which belongs to given core. It is very
usefull feature for tests.
Calling purge is possbile with casadm `--script` swtich.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
Purge invalidates all cache lines. It is very usefull feature for tests.
Calling purge is possbile with casadm `--script` swtich.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
Sorting can take a long time with big cache sizes and a lot of dirty
data. Make sure we reschedule frome time to time to avoid lockups.
Signed-off-by: Jan Musial <jan.musial@intel.com>
Since stopping threads have to be done synchronusly, there is no need to keep
reference to cas_cache module in each thread.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This change assures that data array is always optimally aligned.
Additionally item boolean flags are put into the same uint32
as cpu number in order to save space for future additions.
This change fixes ~50% performance degradation introduced by
commit d822a1d1.
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>