Commit Graph

671 Commits

Author SHA1 Message Date
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
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
Michal Mielewczyk
917577480f Remove running field from cas thread info
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-03-07 16:10:36 -05:00
Michal Mielewczyk
e39eecab49 Don't try to stop non running thread
If _cas_create_thread() thread failed, queue should be stopped by ocf. One of steps
done during queue stop is stopping kernel thread.

To avoid stopping thread which is not running, additional check was added in
_cas_stop_thread().

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-03-07 15:22:30 -05:00
Michal Mielewczyk
3eab28cf44 Add missing module_put() in casse of alloc error
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-03-07 08:47:24 -05:00
Jan Musiał
c19249a471
Merge pull request #341 from imjfckm/move-cls-init-after-attach
Move classifier init after cache device attach completion
2020-02-27 08:56:32 +01:00
Jan Musial
19c334c4cf Move classifier init after cache device attach completion
Right now the classifier is instantiated before device is attached.
This way if we have any IO-classes present on cache device the
classifier will have no knowledge of them and fail to classify IO
correctly.

After moving the classifier init to cache finalization routine we have
all the information needed to initialize properly both in new instance
start path and in load path.

Signed-off-by: Jan Musial <jan.musial@intel.com>
2020-02-25 14:00:07 +01:00
Michal Rakowski
dfab893c3d
Merge pull request #319 from rafalste/tests_display_stats
Add tests for proper statistics display
2020-02-18 12:47:49 +01:00
Michał Mielewczyk
6e1224191f
Merge pull request #260 from Ostrokrzew/many2one
Add FI many to one tests
2020-02-18 09:00:05 +01:00
Katarzyna Łapińska
da493b37bb
Merge pull request #331 from Ostrokrzew/load_init_odlozony
Load cache tests' update
2020-02-18 07:42:57 +01:00
Katarzyna Łapińska
49edc8a8cd
Merge pull request #315 from Ostrokrzew/interrupt
Interruption tests
2020-02-18 07:24:43 +01:00
Rafal Stefanowski
d9a2b017c8 Add tests for proper statistics display
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2020-02-17 17:53:09 +01:00
Slawomir Jankowski
17528aefdd Add interrupt cache stop interrupt test
Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2020-02-17 15:36:31 +01:00
Slawomir Jankowski
657023a79c Add two tests for interrupting cache mode switch
Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2020-02-17 15:36:31 +01:00
Slawomir Jankowski
5f21f4d580 Add interrupt removing core test
Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2020-02-17 15:36:31 +01:00
Slawomir Jankowski
90c27e488c Add Interrupt cache flushing test
Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2020-02-17 15:36:31 +01:00
Slawomir Jankowski
660a99ae5c Add Interrupt core flushing test
Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2020-02-17 15:36:31 +01:00
Michał Mielewczyk
ee9855cad3
Merge pull request #335 from Ostrokrzew/multi
Remove core from multilevel cache test
2020-02-17 15:22:57 +01:00
Katarzyna Łapińska
dcbdb820fb
Merge pull request #325 from mmichal10/flush-params-test
Flush params test
2020-02-17 14:20:47 +01:00
Michal Mielewczyk
b28e2614c0 Test for acp wake up time param.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-02-17 07:28:04 -05:00
Michal Mielewczyk
230667a219 Test for acp flush max buffers param.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-02-17 03:52:17 -05:00
Slawomir Jankowski
8c7f0dcd32 One of many cores in cache fails
OpenCAS continue to work after one of many cores fails
1. Start cache.
2. Add core1 to previously created cache.
3. Add core2 to previously created cache.
4. Fill cache with pages from core1.
5. Fail core1.
6. Check if core2 is able to use cache.

Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2020-02-17 09:44:55 +01:00
Michal Mielewczyk
b96da538e0 Expect particular types in ACP config constructor
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-02-17 03:41:57 -05:00
Michal Mielewczyk
01dcc3b0fd tests: Add __str__ method for ACP config class
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-02-17 03:41:57 -05:00
Michal Rakowski
dbecf22648
Merge pull request #337 from micrakow/seq
functional tests: fix setting seq_cutoff policy
2020-02-14 15:03:51 +01:00
Slawomir Jankowski
4717b942d9 Dynamic allocation of space in cache
OpenCAS continues to operate after one of many cores is released:
1. "Start cache",
2. "Add core1 to previously created cache",
3. "Add core2 to previously created cache",
4. "Fill cache with pages from core1",
5. "Check if core2 is able to use cache"

Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2020-02-14 14:50:29 +01:00
Slawomir Jankowski
9ad35e8ae9 Remove one of multiple cores from cache
OpenCAS continues to operate after one of many cores is removed:
1. "Start cache",
2. "Add core1 to previously created cache",
3. "Add core2 to previously created cache",
4. "Fill cache with pages from core1",
5. "Remove core1",
6. "Check if core2 is able to use cache"

Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2020-02-14 14:50:29 +01:00
Michal Rakowski
25bf128c1a functional tests: fix setting seq_cutoff policy
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2020-02-14 14:48:13 +01:00
Michał Mielewczyk
cf4e0f1e11
Merge pull request #336 from katlapinka/vmalloc-flags
env: implement vmalloc with GFP flags
2020-02-14 14:47:00 +01:00
Adam Rutkowski
e1a7c7f7e8 env: implement vmalloc with GFP flags
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2020-02-14 14:30:12 +01:00
Slawomir Jankowski
8991153bd8 Remove core from multilevel cache
OpenCAS not allow remove the core on 1 level cache when is used by level 2:
/1/ "Create multilevel intelcas device",
/2/ "Try to remove intelcas device on level 1",
/3/ "Remove intelcas device"

Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2020-02-13 15:54:32 +01:00
Slawomir Jankowski
7904c06423 Add message
Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2020-02-13 15:54:32 +01:00
Sławomir Jankowski
ac05dadfcd
Merge pull request #320 from micrakow/kedr_io
functional tests: add kedr with filesystem test
2020-02-13 15:34:28 +01:00
Michał Mielewczyk
1c45ae5b3c
Merge pull request #316 from katlapinka/acp-functional
Functional test for acp cleaning policy
2020-02-13 14:42:19 +01:00
Michal Rakowski
2192ec2d55
Merge pull request #330 from rafalste/makefile_for_rpm
Makefile changes for building RPM
2020-02-13 14:25:47 +01:00
Michal Rakowski
77124296ee functional tests: add kedr with filesystem test
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2020-02-13 14:04:37 +01:00
Michal Rakowski
30b06e07a4
Merge pull request #314 from Deixx/align
Size alignment update in tests
2020-02-13 13:50:34 +01:00
Katarzyna Lapinska
cc39256dac Functional test for acp cleaning policy 2020-02-13 13:50:18 +01:00
Michal Rakowski
919aa35d08
Merge pull request #258 from Ostrokrzew/stop_n_load
Add FI test: stop --no-flush-cache
2020-02-13 11:28:58 +01:00
Michał Mielewczyk
71d8f04565
Merge pull request #305 from Deixx/core-fs
Test API: Filesystem on core + set sequential cut-off fix
2020-02-12 14:45:58 +01:00
Slawomir Jankowski
f1749526fb Stop cache '--no-data-flush' without fs on core
Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2020-02-12 13:06:36 +01:00
Slawomir Jankowski
232b6ef21c Stop cache '--no-data-flush' with fs on core
Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2020-02-12 13:06:19 +01:00