Commit Graph

1380 Commits

Author SHA1 Message Date
Jan Musial
9360e55851 Update basic pyOCF tests to use rio
Signed-off-by: Jan Musial <jan.musial@intel.com>
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2022-02-24 14:56:09 +01:00
Adam Rutkowski
17eddab094 pyocf: queue settle functionality
Queue settle is a mechanism to wait for all OCF processing
on a given queue to finish.

In some tests simply waiting for I/O to finish is not enough. Most
notably some statistics are potentially incremented after user triggered
I/O is finished. This is due to asynchronous nature of I/O operations
and OCF approach to statistics update, where only eventual consistency
is guaranteed without explicit mechanism available to query whether
the final state is reached yet. However it is fully in the adapter power
to determine this, as OCF executes in context of API calls from the
adapter (like I/O submission, ocf_queue_run, ocf_cleaner_run, management
operations) and I/O completion callbacks. Queue settle is a mechanism to
assure ocf_queue_run is not being executed by the thread associated with
a queue.

With queue settle mechanism it is straightforward for the adapter to
wait for cache statistics to reach fixed values:
1. wait for all I/O to OCF to finish
2. settle all I/O queues
3. make sure background cleaner is not active

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2022-02-24 14:56:09 +01:00
Jan Musial
41732090ae Implement rio io tester for pyocf
rio stands for Rigid IO tester and is a simple mechanism for testing
OCF cache IO.

Signed-off-by: Jan Musial <jan.musial@intel.com>
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2022-02-24 14:56:09 +01:00
Jan Musial
96124ca87a Enable Size comparisons in pyocf
Signed-off-by: Jan Musial <jan.musial@intel.com>
2022-02-24 14:56:09 +01:00
Adam Rutkowski
021e7e87ad
Merge pull request #559 from jfckm/pyocf-loading
Make loading in pyocf viable
2022-02-24 14:08:09 +01:00
Jan Musial
9fcc7bfbb7 Use new capabilities in surprise shutdown tests
Signed-off-by: Jan Musial <jan.musial@intel.com>
2022-02-24 12:27:10 +01:00
Jan Musial
5d31dd87d0 Test for open_cores load
Signed-off-by: Jan Musial <jan.musial@intel.com>
2022-02-24 12:27:10 +01:00
Jan Musial
973a474b37 Make open_cores load viable by adding getter for cores
Signed-off-by: Jan Musial <jan.musial@intel.com>
2022-02-24 12:27:10 +01:00
Jan Musial
53d2c5a197 Fix test_start_stop_noqueue
Signed-off-by: Jan Musial <jan.musial@intel.com>
2022-02-24 12:27:10 +01:00
Jan Musial
bfee654770 Add wrapper for cache_config_set_default
Signed-off-by: Jan Musial <jan.musial@intel.com>
2022-02-24 12:27:10 +01:00
Jan Musial
6f1080d6a8 Add missing include in ocf_volume.h
Signed-off-by: Jan Musial <jan.musial@intel.com>
2022-02-24 12:27:10 +01:00
Jan Musial
2038c3aa68 Add basic load test with core reattachment and cleanup structures
Signed-off-by: Jan Musial <jan.musial@intel.com>
2022-02-24 12:27:10 +01:00
Jan Musial
30fe2eb783 Handle try_add core adding mode
Signed-off-by: Jan Musial <jan.musial@intel.com>
2022-02-24 12:27:10 +01:00
Adam Rutkowski
6a1d5f2ad6
Merge pull request #583 from jfckm/multiple-pyocf-ctx
Support multiple PyOcf ctx instances plus leak fixes
2022-02-23 14:28:47 +01:00
Robert Baldyga
b65ca6233b
Merge pull request #661 from mmichal10/check-id-on-actiavte
Verify cache id duing the activate
2022-02-18 15:41:01 +01:00
Michal Mielewczyk
116676c18d Verify cache id duing the activate
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2022-02-17 15:02:03 +01:00
Jan Musial
1273e9ddfe Fix leaking Volumes and OcfCtx's
Signed-off-by: Jan Musial <jan.musial@intel.com>
2022-02-16 07:06:05 +01:00
Jan Musial
8f47cfa5bf Make multiple pyocf loggers viable
Signed-off-by: Jan Musial <jan.musial@intel.com>
2022-02-16 07:06:05 +01:00
Jan Musial
441e3c20d7 Clean-up pyocf c-python shared objects instance tracking
Signed-off-by: Jan Musial <jan.musial@intel.com>
2022-02-16 07:06:05 +01:00
Jan Musial
4c9d4fe24e Fix pyocf Ctx ownership
Signed-off-by: Jan Musial <jan.musial@intel.com>
2022-02-16 07:06:05 +01:00
Robert Baldyga
da59a1c9aa
Merge pull request #634 from arutk/mopft_21.12
pyocf: management operation power failure tests
2022-02-14 14:10:52 +01:00
Robert Baldyga
6af8d20cee
Merge pull request #655 from hammerg/linux_stdarg_h
Fix compilation error regarding stdarg.h file
2022-02-07 16:28:25 +01:00
Robert Baldyga
49abe816ce
Merge pull request #649 from pdebski21/1023
fix for issue #1023
2022-02-07 16:17:14 +01:00
Robert Baldyga
d53047b5f9
Merge pull request #657 from robertbaldyga/standby-remove-runtime-recovery
Remove runtime recovery in standby mode
2022-02-07 15:56:59 +01:00
Gal Hammer
3da29e5f3b Fix compilation error regarding stdarg.h file
Linux includes its own stdarg.h file since version 5.15. This change
allows ocf library to compile as part of a kernel module.

Signed-off-by: Gal Hammer <gal.hammer@huawei.com>
Signed-off-by: Shai Fultheim <shai.fultheim@huawei.com>
2022-02-07 15:10:01 +02:00
Robert Baldyga
76684ed8a9
Merge pull request #642 from robertbaldyga/parallelize
Parallelize metadata initialization
2022-02-07 13:53:45 +01:00
Robert Baldyga
e30fd48338
Merge pull request #656 from jfckm/extend-metadata-probe
Include cache mode and cache line size in metadata probe
2022-02-04 13:01:10 +01:00
Jan Musial
8522b0b6e6 Include cache mode and cache line size in metadata probe
Signed-off-by: Jan Musial <jan.musial@intel.com>
2022-02-04 08:15:05 +01:00
Robert Baldyga
c176daeec1
Merge pull request #640 from pdebski21/superblock_mismatch
added error code for superblock mismatch
2022-02-03 15:30:03 +01:00
Robert Baldyga
805ea14529 Remove runtime recovery in standby mode
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-02-01 03:11:50 +01:00
Robert Baldyga
6a665ea6b1 Shuffle entries within freelists
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-01-31 06:59:28 +01:00
Robert Baldyga
53f6cffe7f tests: Add unit tests for bisect generator
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-01-31 06:59:28 +01:00
Robert Baldyga
481e5b7b9b Introduce bisect generator utility
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-01-31 06:59:28 +01:00
Robert Baldyga
93391c78d8 Parallelize ACP recovery
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-01-31 06:59:28 +01:00
Robert Baldyga
b70492ad3d Parallelize ALRU recovery
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-01-31 06:59:28 +01:00
Robert Baldyga
8cc71cc9cb Remove ocf_cleaning_init_cache_block() from metadata rebuild
Cleaning policy initializaton initializes metadata for all cache lines
anyway, so this step is not needed.

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-01-28 19:30:41 +01:00
Robert Baldyga
48bed40dd7 Reconstruct freelist during metadata rebuild
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-01-28 19:30:39 +01:00
Robert Baldyga
f3e4f8c2db Parallelize ocf_mngt_rebuild_metadata()
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-01-28 19:29:52 +01:00
Robert Baldyga
036aca41b3 Parallelize ocf_lru_populate()
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-01-28 19:29:21 +01:00
Robert Baldyga
6611b25d1e Initialize LRU lists in domain of cache lines
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-01-28 19:29:21 +01:00
Robert Baldyga
57fd5c1f20 Introduce ocf_parallelize utility
Introduce utility that allows to parallelize management operation across
all available io queues.

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-01-28 19:29:21 +01:00
Robert Baldyga
a947127f55 Introduce ocf_lru_add_free() function
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-01-28 19:29:21 +01:00
Robert Baldyga
b82d30a0ef Add missing hb lock functions implementation
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-01-28 19:29:21 +01:00
Robert Baldyga
25e2551964 Check core status during recovery based on core metadata
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-01-28 19:29:21 +01:00
Robert Baldyga
568c565497 Init properties before loading superblock
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-01-28 19:29:21 +01:00
Piotr Debski
9b980d3f22 fix for issue #1023
Better error for core size mismatch during activation/load

adding pyocf test for new error code

Signed-off-by: Piotr Debski <piotr.debski@intel.com>
2022-01-25 05:18:16 +01:00
Robert Baldyga
f4daf05237
Merge pull request #639 from arutk/eha
Fix error handling in cache attach
2022-01-19 15:26:34 +01:00
Robert Baldyga
bef79c9b9a
Merge pull request #643 from robertbaldyga/seq_no-in-atomic
Set core_seq_no only in atomic mode
2022-01-19 12:29:25 +01:00
Robert Baldyga
fb8bea67b6 Set core_seq_no only in atomic mode
This prevents using up pool of seq numbers in normal mode and blocking
addition of any new cores.

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-01-19 11:38:12 +01:00
Robert Baldyga
c35eb2a15c
Merge pull request #575 from arutk/async_example
simple example: implement queues based on threads
2022-01-18 12:36:39 +01:00