Commit Graph

711 Commits

Author SHA1 Message Date
Robert Baldyga
603308f689
Merge pull request #374 from mmichal10/memory-find
Stop cache threads synchronously
2020-03-31 15:30:15 +02:00
Michal Mielewczyk
664c974e03 Revert "Free thread memory after it is stopped."
This reverts commit d483951ebe.
2020-03-31 08:23:57 -04:00
Robert Baldyga
2334366914
Merge pull request #373 from arutk/allocator_item_alignment_fix
Improve _env_allocator_item fields alignment
2020-03-31 13:32:32 +02:00
Michal Mielewczyk
1b3424a485 Revert "Free memory of all allocated threads."
This reverts commit 4ec277433d.
2020-03-31 06:46:27 -04:00
Michal Mielewczyk
758c5aa895 Don't hold reference to module in thread
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>
2020-03-31 06:41:11 -04:00
Robert Baldyga
d9ca4f4bd4
Merge pull request #370 from rafalste/fix_git_in_pckgen
Fix git calls in package generator script
2020-03-30 13:31:10 +02:00
Robert Baldyga
299d1211ef
Merge pull request #372 from mmichal10/memory-find
Alloc rpool with strict memory requirements
2020-03-30 13:30:52 +02:00
Adam Rutkowski
82137c9bc1 Improve _env_allocator_item fields alignment
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>
2020-03-30 00:39:26 +02:00
Rafal Stefanowski
a2d64d7d55 Fix git calls in package generator script
- make git command compatible with older git versions by removing -C option
- minor syntax improvements in the entire script

Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2020-03-27 16:19:57 +01:00
Robert Baldyga
cd7b6b642b
Merge pull request #371 from arutk/ocf_update_270320
OCF update 03/27/20
2020-03-27 15:29:24 +01:00
Robert Baldyga
6bb4dde213
Merge pull request #369 from mmichal10/async-stop-compl
Before stop wait for start to be finished
2020-03-27 13:59:18 +01:00
Robert Baldyga
d7acbac253
Merge pull request #363 from mmichal10/change-cachemode-with-progressbar
Show progress bar during changing cache mode
2020-03-27 09:14:22 +01:00
Robert Baldyga
de296dd89f
Merge pull request #367 from mmichal10/async-stop-compl
Create finalize thread during stop
2020-03-26 14:16:29 +01:00
Adam Rutkowski
93e7b77d27 OCF update 03/27/20
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2020-03-26 02:49:59 +01:00
Michal Mielewczyk
8c57dc51c0 Alloc rpool with strict memory requirements
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-03-25 19:25:26 -04:00
Robert Baldyga
af6d3e9d06
Merge pull request #368 from arutk/rpool_debug
Runtime checks for allocator rpool consistency
2020-03-25 15:09:20 +01:00
Robert Baldyga
5b37183e41
Merge pull request #344 from rafalste/add_package_generator
Add package generator script
2020-03-25 12:40:29 +01:00
Michal Mielewczyk
3edaf30a73 Before stop wait for start to be finished
To prevent cache being stopped before async start finialize has finished, stop
routine have to check if worker responsible for finalizing is not running
anymore.

To create link between start finalize and stop functions, work_struct had to be
moved from attach_context to cache_priv.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-03-25 06:24:23 -04:00
Michal Mielewczyk
33223bacb9 Fix flush sync wrappers
Call completion function in case of allocation error

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-03-25 01:52:04 -04:00
Michal Mielewczyk
17d5c8599d Use wrapper function to flush cache during stop
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-03-25 01:52:04 -04:00
Michal Mielewczyk
dca9769298 Acquire read lock for flushing cache
Read lock allows to retrieve informations about flushing progress and printing
progress bar during changing cache mode.

Flushing dirty data during changing cache mode is done twice - first flush might
be interrupted by user and the second one, called with write lock acquired, is
uninterruptable.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-03-25 01:52:04 -04:00
Robert Baldyga
e10e93533f
Merge pull request #353 from rafalste/bidirectional_rsync
Update rsync usage to utilize bidirectional rsync
2020-03-24 18:23:28 +01:00
Rafal Stefanowski
d5e632d3a3 Update rsync usage to utilize bidirectional rsync
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2020-03-24 15:38:54 +01:00
Michal Mielewczyk
2fffd789c0 Create finalize thread during stop
Creating finalize thread on cache start causes soft lookups during whole
instance lifetime

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-03-24 07:45:33 -04:00
Adam Rutkowski
d822a1d12e Runtime checks for allocator rpool consistency
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2020-03-24 01:58:11 +01:00
Robert Baldyga
ef94a0df22
Merge pull request #362 from mmichal10/fix-core-removing
Fix core removing
2020-03-23 14:41:17 +01:00
Robert Baldyga
bf4256eb27
Merge pull request #364 from micrakow/ocf_udpate
OCF update
2020-03-23 14:28:57 +01:00
Michal Rakowski
eef7cf97ce OCF update
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2020-03-23 13:16:32 +01:00
Robert Baldyga
8b1254dfea
Merge pull request #355 from mmichal10/async-stop-compl
Async stop compl
2020-03-23 13:00:50 +01:00
Michal Mielewczyk
9e692435f6 Allocate stop context on during start
To make cache stop as simple as possibe and to reduce number of errors, stop
context should be allocated during cache initialize.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-03-23 03:28:26 -04:00
Michal Mielewczyk
f93019165f Hold reference to module for each thread
To prevent removing cas_cache module when not all thread were stopped yet, each
of them should keep reference.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-03-20 11:17:00 -04:00
Michal Mielewczyk
55d53867cc Complete cache stop from kthread
To enable stopping management queue from completion context, last queue_put()
have to be called from separate thread.

After cache is fully deinitialized, thread calls module_put_and_exit() to
prevent scenario when code is still executed, but there are no references to
module.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-03-20 11:17:00 -04:00
Michal Mielewczyk
91c8c02860 Simplify functions managing core ids
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-03-20 10:39:17 -04:00
Michal Mielewczyk
5ca9287b53 Refactor core removing function
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-03-20 10:39:17 -04:00
Rafal Stefanowski
7335b321ea Add package generator script
- add a 'pckgen' script to generate various OpenCAS packages like
release archives (tar, zip), RPMs (source and binary) as well as to
create version file with metadata
- add a SPEC file for RPM creation
- add Makefile targets to use 'pckgen' script through 'make <package>'

'pckgen' script has a bunch of features for package generation.
Read './pckgen --help' for more information on usage scenarios.

Script is also prepared to easily add new packages creation in the future.

Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2020-03-20 03:16:56 +01:00
Robert Baldyga
68533834dd
Merge pull request #361 from Ostrokrzew/update
Casadm man extend
2020-03-19 19:47:59 +01:00
Robert Baldyga
32fe754b08
Merge pull request #356 from mmichal10/rename-MU-thread
Fix metadata updater thread prefix
2020-03-19 13:23:18 +01:00
Slawomir Jankowski
5d74062599 Casadm man extend
Add description of OpenCAS exported objects' naming template
Update date in mans.
closes #359

Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2020-03-19 13:05:18 +01:00
Robert Baldyga
8b5d187555
Merge pull request #357 from imjfckm/memory-checks
Update OCF to include pp memory check and updated cache memory check
2020-03-18 14:20:00 +01:00
Jan Musial
a3f2ed7c86 Update OCF to include pp memory check and updated cache memory check
Signed-off-by: Jan Musial <jan.musial@intel.com>
2020-03-18 10:32:53 +01:00
Michal Mielewczyk
2ef9090d87 Fix metadata updater thread prefix
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-03-17 18:04:49 -04:00
Robert Baldyga
5d99f0c092
Merge pull request #354 from Deixx/casctl-stop-exit
Return exit codes from casctl stop
2020-03-17 17:38:56 +01:00
Daniel Madej
55bdad7054 Return exit codes from casctl stop
Signed-off-by: Daniel Madej <daniel.madej@intel.com>
2020-03-17 11:55:51 +01:00
Robert Baldyga
9f6d407d10
Merge pull request #349 from imjfckm/alru-noidle-test
Allow activity threshold and wake up time in ALRU set to 0s
2020-03-13 17:19:13 +01:00
Jan Musial
650dbf5d31 Add test for ALRU with activity threshold set to 0
Signed-off-by: Jan Musial <jan.musial@intel.com>
2020-03-11 11:27:48 +01:00
Jan Musial
8d86cdfa3b Allow whole range of ALRU parameters in test API
Signed-off-by: Jan Musial <jan.musial@intel.com>
2020-03-11 11:27:48 +01:00
Jan Musial
1b0c0f6380 Update test framework
Signed-off-by: Jan Musial <jan.musial@intel.com>
2020-03-11 11:27:48 +01:00
Jan Musial
1588deafd5 Update OCF
Signed-off-by: Jan Musial <jan.musial@intel.com>
2020-03-11 11:27:48 +01:00
Robert Baldyga
09c585bbcd
Merge pull request #350 from mmichal10/dont-stop-notexisting-thread
Don't try to stop non running thread
2020-03-10 17:58:34 +01:00
Robert Baldyga
3d42ba1c1d
Merge pull request #348 from mmichal10/missing-put-module
Add missing module_put() in casse of alloc error
2020-03-10 09:21:52 +01:00