Commit Graph

785 Commits

Author SHA1 Message Date
Robert Baldyga
1c9312842a
Merge pull request #369 from rafalste/copyright_update
Update copyright statements
2020-05-06 12:42:10 +02:00
Robert Baldyga
5d4da8e26c
Merge pull request #364 from micrakow/big_req
Force pass-through for requests bigger than cache
2020-05-06 11:58:09 +02:00
Michal Rakowski
e7a2f333ae Take into account bytes from incoming req for 'full' seq cutoff policy
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2020-05-06 11:07:26 +02:00
Rafal Stefanowski
38e7e19290 Update copyright statements
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2020-04-28 13:37:54 +02:00
Michal Rakowski
0f85a73669 pyocf: test_eviction fixup
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2020-04-24 15:34:59 +02:00
Michal Rakowski
67577fc1ef Force pass-through for requests bigger than cache
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2020-04-24 15:34:27 +02:00
Robert Baldyga
8fb5317247
Merge pull request #366 from robertbaldyga/initialize-seq-cutoff-correctly
Initialize seqential cutoff in try-add / load paths
2020-04-23 09:11:14 +02:00
Robert Baldyga
15fd53cbb0 Initialize seqential cutoff in try-add / load paths
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-04-23 00:41:53 +02:00
Robert Baldyga
188559416c
Merge pull request #354 from robertbaldyga/multistream-seq-cutoff
Introduce multi-stream seqential cutoff
2020-04-22 15:35:42 +02:00
Jan Musial
9a8eb7ed90 Basic test for multistream seq cutoff
Signed-off-by: Jan Musial <jan.musial@intel.com>
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-04-22 13:30:42 +02:00
Jan Musial
93a0d9554c Implement API for setting seq cutoff threshold
Signed-off-by: Jan Musial <jan.musial@intel.com>
2020-04-22 13:30:42 +02:00
Jan Musial
e4b11b6933 Add context to OcfCompletion
Signed-off-by: Jan Musial <jan.musial@intel.com>
2020-04-22 13:30:42 +02:00
Jan Musial
52962402fe Extend Size class to enable arithmetics
Signed-off-by: Jan Musial <jan.musial@intel.com>
2020-04-22 13:30:42 +02:00
Robert Baldyga
e9afb40860 Add sequential cutoff debug interface
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-04-22 13:30:42 +02:00
Robert Baldyga
93cd0615d3 Introduce multi-stream sequential cutoff
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-04-22 13:30:42 +02:00
Robert Baldyga
9d07955640
Merge pull request #363 from Ostrokrzew/version
Update version
2020-04-07 08:21:56 +02:00
Slawomir Jankowski
13828ab836 Update version
Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2020-04-06 16:30:59 +02:00
Robert Baldyga
72f11d0771
Merge pull request #362 from robertbaldyga/fix-flush-deadlock
Fix deadlock on concurrent flush at the same cache
2020-04-05 10:49:41 +02:00
Robert Baldyga
a9c36477d2 Fix deadlock on concurrent flush at the same cache
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-04-03 18:09:35 +02:00
Robert Baldyga
7799b24858 env: posix: Add missing env_mutex_trylock() function
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-04-03 18:09:35 +02:00
Robert Baldyga
53dc4020e3
Merge pull request #358 from arutk/req_queue_fix
Do not reference req after adding to queue list
2020-03-27 15:04:51 +01:00
Robert Baldyga
80b410dc2e
Merge pull request #355 from arutk/flush_fixes
Fix stalls and warnings during flush
2020-03-27 14:11:34 +01:00
Adam Rutkowski
e39a76aa5e Do not reference req after adding to queue list
ocf_engine_push_req_(front|back) must not dereference req
pointer after putting the request on queue list and unlocking
the queue. At this point handler interface may asynchronously
pick up the request, handle it and deallocate.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2020-03-26 01:29:02 +01:00
Adam Rutkowski
b267d5d77d Reduce flush relaxation period by 1 order of magninude
Loop now relaxes every 2^17 (131K) cycles instead of every 1M.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2020-03-25 23:37:49 +01:00
Adam Rutkowski
fd328bd0a1 Check relaxation condition in each step of flush loop
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2020-03-25 23:36:43 +01:00
Adam Rutkowski
4d61d56249 Rename flushing functions local variables for readibility
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2020-03-25 23:29:16 +01:00
Robert Baldyga
cf5e13c4aa
Merge pull request #357 from arutk/parallel_flush_Fix
Queue flush portion requests to the back of IO queue
2020-03-24 23:15:11 +01:00
Robert Baldyga
332ad1dfbc Make seq cutoff policy and threshold atomic variables
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-03-24 18:17:15 +01:00
Robert Baldyga
935df23c74 Introduce red-black trees utility
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-03-24 18:17:15 +01:00
Adam Rutkowski
64dcae1490 Split global metadata lock critial path
There is no need to constantly hold metadata global lock
during collecting cachelines to clean. Since we are past
freezing dirty request counter, we know for sure that the
number of dirty cache lines will not increase. So the worst
case is when the loop realxes and releases the lock,
a concurent IO to CAS is serviced in WT mode, possibly
inserting and/or evicting cachelines. This does not interfere
with scanning for dirty cachelines. And the lower layer will
handle synchronization with concurrent I/O by acquiring
asynchronous read lock on each cleaned cacheline.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2020-03-23 19:32:15 -04:00
Adam Rutkowski
3b3a49e8ea Queue flush portion requests to the back of IO queue
In current implementation in case of fast media flushning
container may starve all concurrent containers flushing
due to continous rescheduling of offender requests to the
front of I/O queue. Pushing request to the back of IO
queue ensures FIFO handling and removes possibility of
starvation.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2020-03-23 19:06:14 -04:00
Adam Rutkowski
c17beec7d4 Do not exclude used cachelines from flushing
Lower layer is prepared to handle used cachelines by
acquiring asynchronus read lock. It is very likely that
by the time the cacheline is actually cleaned its lock
state changes. So checking the lock at the moment of
constructing dirty cachelines list makes little sense.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2020-03-23 12:59:30 -04:00
Adam Rutkowski
61983c946c Move flush containers sort & submit outside metadata lock
Moving _ocf_mngt_flush_containers outside global metadata
critical section. All this function does is sort core lines
and add queue request.

This fixes stalls reported by Linux scheduler due to
IO threads waiting on global metadata RW semaprhore for
several minutes.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2020-03-23 12:59:30 -04:00
Robert Baldyga
86d7212217
Merge pull request #356 from robertbaldyga/ut-cache-alloc
ut: Add cache allocation & do little cleanup
2020-03-23 13:21:17 +01:00
Robert Baldyga
f7d191b765 ut: Add cache allocation & do little cleanup
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-03-23 12:38:43 +01:00
Robert Baldyga
c295a4f670 ut: Add .gitignore
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-03-23 12:33:12 +01:00
Robert Baldyga
ed91895f70
Merge pull request #351 from micrakow/seq_cutoff_pt_fix
Fix seq_cutoff respecting in pt read
2020-03-23 10:46:09 +01:00
Michal Rakowski
6f4d02f251 Fix seq_cutoff respecting in pt read
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2020-03-20 18:58:10 +01:00
Michal Rakowski
2edd05c812 Change get_effective_cache_mode to operate on req instead of io
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2020-03-20 18:58:10 +01:00
Michal Rakowski
d84942daa3 Typo fixes
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2020-03-17 16:36:40 +01:00
Robert Baldyga
22bdb8b004
Merge pull request #352 from robertbaldyga/update-memory-requirement-check
Update memory requirement check
2020-03-17 15:28:56 +01:00
Robert Baldyga
9b9c7e88e7
Merge pull request #350 from imjfckm/check-promotion-memory
Add memory check before engaging promotion policy
2020-03-17 15:20:25 +01:00
Robert Baldyga
94b4bee6de Update memory requirement check
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-03-17 14:42:01 +01:00
Jan Musial
d2fe82dc85 Add memory check before engaging promotion policy
Signed-off-by: Jan Musial <jan.musial@intel.com>
2020-03-16 09:09:42 +01:00
Robert Baldyga
b08514c2db
Merge pull request #349 from imjfckm/optimize-nhit-hash
Reorder fields in nhit_hash map to improve memory efficiency
2020-03-09 20:23:32 +01:00
Jan Musial
4eb5612832 Reorder fields in nhit_hash map to improve memory efficiency
Signed-off-by: Jan Musial <jan.musial@intel.com>
2020-03-06 12:36:46 +01:00
Robert Baldyga
2a7a2bd6ca
Merge pull request #348 from robertbaldyga/introduce-core-priv
Introduce core priv
2020-03-03 15:52:59 +01:00
Robert Baldyga
108fe28ad4 Introduce core priv
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-03-03 15:37:12 +01:00
Robert Baldyga
b871d32617
Merge pull request #347 from imjfckm/allow-zero-in-alru-params
Allow 0ms activity threshold and wake up time for ALRU
2020-02-25 08:53:45 +01:00
Jan Musial
677e9e07e5 Allow 0ms activity threshold and wake up time for ALRU
Signed-off-by: Jan Musial <jan.musial@intel.com>
2020-02-21 16:05:20 +01:00