Commit Graph

221 Commits

Author SHA1 Message Date
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
Michal Rakowski
e5227cef89 Implement pyocf adapter with sample OCF test
PyOCF is a tool written with testing OCF functionality in mind.
It is a Python3 (3.6 version required) package which wraps OCF
by providing Python objects in place of OCF objects (volumes, queues,
etc). Thin layer of translation between OCF objects and PyOCF objects
enables using customized behaviors for OCF primitives by subclassing
PyOCF classes.

This initial version implements only WT and WI modes and single,
synchronously operating Queue.

TO DO:

  - Queues/Cleaner/MetadataUpdater implemented as Python threads
  - Loading of caches from PyOCF Volumes (fix bugs in OCF)
  - Make sure it works multi-threaded for more sophisticated tests

Co-authored-by: Jan Musial <jan.musial@intel.com>
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
Signed-off-by: Jan Musial <jan.musial@intel.com>
2019-03-07 12:48:40 +01: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
Robert Baldyga
f933246dba Introduce basic OCF build test with posix environment
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-01-16 14:10:29 +01:00
Robert Baldyga
ad10d58a2c Update posix environment
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-01-15 09:41:33 +01:00
Michal Rakowski
ad3467ddd4 Added Makefile for ocf lib to be used in functional tests
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2019-01-08 12:58:28 +01:00
Robert Baldyga
4be6761a18 Core data object
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-01-04 08:33:34 +01:00
Mariusz Barczak
15ed5b4450 OCF provides own macros for MIN, MAX, and DIV_ROUND_UP
Signed-off-by: Mariusz Barczak <mariusz.barczak@intel.com>
2018-12-13 10:59:23 -05:00
Robert Baldyga
db92083432 Unify req naming convention (rq -> req)
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2018-12-12 13:36:34 +01:00
wolszews
0cb11b0d3c Remove OCF prefix 2018-12-06 16:04:30 +01:00
Michal Mielewczyk
35ae74e3fa Fix existing unit tests
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2018-12-06 06:30:50 -05:00
Robert Baldyga
a8e1ce8cc5 Initial commit
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2018-11-29 15:14:21 +01:00