Commit Graph

36 Commits

Author SHA1 Message Date
Adam Rutkowski
0c31cc62d0 Freelist test
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-09-09 16:19:52 -04:00
Adam Rutkowski
964ba85467 unit tests: improve test logs content
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-09-09 16:19:52 -04:00
Jan Musial
62a0ccdd9f nhit promotion policy implementation
Signed-off-by: Jan Musial <jan.musial@intel.com>
2019-08-22 13:34:38 +02:00
Slawomir_Jankowski
679bc38770 OCF Cleanup
**ocf_env**: deleting unused functions from main file

Signed-off-by: Slawomir_Jankowski <slawomir.jankowski@intel.com>
2019-08-09 14:45:29 +02:00
Kamil Łepek
05be67a72b
Merge pull request #220 from arutk/metadata_offset_hash
New hash function formula
2019-07-29 13:03:04 +02:00
Adam Rutkowski
9b8815935a Unit test for hashing function
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-07-29 13:24:25 -04:00
Adam Rutkowski
494861c994 Rename cache_concurrency to cache_line_concurrency
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-07-24 15:32:12 -04:00
Michal Mielewczyk
3005b6b5b5 Prevent warpping ocf_mngt_cache_mode_has_lazy_write() in UT.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-06-28 07:39:24 -04:00
Kamil Lepek
e52d34c1c8 Adapt all python code to PEP8 style standards
Signed-off-by: Kamil Lepek <kamil.lepek94@gmail.com>
2019-06-13 17:55:41 +02:00
Michal Mielewczyk
3e2ee7a7c8 UT framerwok: Auto generating wrap functions
Test code have to contain wraps only for those functions, which are used by
test itself. Empty wraps are generated automatically by UT framework.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-06-06 08:20:25 -04:00
Michal Mielewczyk
e6bedb692c Unified management functions prefix.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-06-05 09:31:59 -04:00
Robert Baldyga
711de86bff Associate core metadata with core object
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-05-28 14:49:59 +02:00
Robert Baldyga
8a82be339f Introduce asynchronous cache lock
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-05-28 11:20:48 +02:00
Robert Baldyga
bdcd4df0ef Remove utils_device.h
Move core mngt related code to ocf_mngt_core.c

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-05-27 17:00:39 +02:00
Robert Baldyga
7de56940a4 Move ocf_request from utils
ocf_request has always been first class citizen in OCF,
so lets place it along with another essential objects.

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-05-27 15:51:27 +02:00
Robert Baldyga
ab2fc6d3c3 Rename utils_allocator to utils_realloc
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-05-27 13:10:17 +02:00
Robert Baldyga
a671a28282 Convert UT scripts to python3
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-05-24 10:13:50 +02:00
Kamil Lepek
827a115fa9 Gather all unit tests logs in single directory
Signed-off-by: Kamil Lepek <kamil.lepek94@gmail.com>
2019-05-17 11:35:33 +02:00
Kamil Lepek
382c31a8e0 Save unit tests output to file
Seperate output of different script stages

Signed-off-by: Kamil Lepek <kamil.lepek94@gmail.com>
2019-05-16 10:26:02 +02:00
Adam Rutkowski
1e812b4eaf Unit tests for reference counter utility
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-05-07 12:40:06 -04:00
Adam Rutkowski
84f5454b29 Update unit tests to work with extedned ref counters
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-05-06 19:37:51 -04:00
Robert Baldyga
6cd84476f6 Handle metadata asynchronously
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-03-26 12:49:23 +01:00
Robert Baldyga
72b6f35f52 Implement asynchronous save, add core and remove core
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-03-21 09:03:59 +01:00
Robert Baldyga
23b0a32aec Parametrize pipeline steps
This allows to reuse same step functions giving them different parameters
on each step.

Additionally move pipeline to utils, to make it accessible to other
subsystems of OCF (e.g. metadata).

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-03-20 17:06:56 +01:00
Robert Baldyga
91e0345b78 Implement asynchronous attach, load, detach and stop
NOTE: This is still not the real asynchronism. Metadata interfaces
are still not fully asynchronous.

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-03-18 15:06:57 +01:00
Robert Baldyga
c5df82f2cb Make management API asynchronous
NOTE: This patch only changes API that pretends to be asynchronous.
Most of management operations are still performed synchronously.
The real asynchronism will be introduced in the next patches.

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-03-12 10:33:26 +01:00
Michal Mielewczyk
d06f376627 Alru cleaning policy improvement
Instead of calling flush separatly for each IO class, it is called after
collecting number of dirty cache lines defined by user or after iterating
through all IO classes.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-03-11 04:08:16 -04:00
Robert Baldyga
9b9b965b55 Add cache locking functions in trylock variant
- Add cache trylock and read trylock functions.
- Introduce new error code -OCF_ERR_NO_LOCK.
- Change trylock functions in env to return this code in case of
  lock contention.

[ENV CHANGES REQUIRED]
Following functions should return 0 on success or -OCF_ERR_NO_LOCK
in case of lock contention:
- env_mutex_trylock()
- env_rwsem_up_read_trylock()
- env_rwsem_up_write_trylock()

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-03-01 17:31:32 +01:00
Michal Mielewczyk
e53944d472 Dynamic I/O queue management
- Queue allocation is now separated from starting cache.
- Queue can be created and destroyed in runtime.
- All queue ops accept queue handle instead of queue id.
- Cache stores queues as list instead of array.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-02-26 17:36:19 +01:00
Robert Baldyga
404b976109 Make cleaner asynchronous
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-02-19 16:10:24 +01:00
Robert Baldyga
97300b1137 Rename "data object" to "volume"
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-02-08 14:13:05 +01:00
Michal Mielewczyk
2dfd6248c9 Configure all io classes at once.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-01-28 08:51:26 -05:00
Michal Mielewczyk
5e97795630 Fixed script for generating UT templates
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-01-24 05:16:16 -05:00
Robert Baldyga
6860cdbd2c Reorganize context ops
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-01-22 13:14:35 +01:00
Robert Baldyga
03c2f142b3 Cache lock cleanup and API improvements
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-01-21 13:46:28 +01:00
Kamil Łepek
92b2fa362e Refactor tests directory
Signed-off-by: Kamil Łepek <kamil.lepek94@gmail.com>
2019-01-18 03:12:49 -06:00