Rafal Stefanowski
6ed4cf8a24
Update copyright statements (2021)
...
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2021-01-21 13:17:34 +01:00
Adam Rutkowski
012438c279
Add missing collision page lock in cleaner
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-01-20 19:28:41 -06:00
Adam Rutkowski
bd20d6119b
External linkage for function to sparse single cline
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-01-15 02:10:42 -05:00
Robert Baldyga
fd88c2c3a4
Merge pull request #436 from mmichal10/metadata-assert
...
Metadata assert
2021-01-08 10:15:08 +01:00
Michal Mielewczyk
d0225ef1cb
Prevent uint32_t overflow
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-01-07 02:45:05 -05:00
Robert Baldyga
ea1fc7a6d4
seq-cutoff: Don't modify node list under read lock
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-01-05 19:46:37 +01:00
Michal Mielewczyk
0dc8b5811c
Store min and max ioclass size as percentage val
...
Min and max values, keept as an explicit number of cachelines, are tightly
coupled with particular cache. This might lead to errors and mismatches after
reattaching cache of different size.
To prevent those errors, min and max should be calculated dynamically.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-12-21 08:23:34 -05:00
Michal Mielewczyk
05f3c22dad
Occupancy per ioclass utilities
...
Functions to check space availability and to manage cachelines reservation
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-12-21 08:18:47 -05:00
Michal Mielewczyk
600bd1d859
Access partition's metadata counters via functions
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-12-21 08:00:25 -05:00
Adam Rutkowski
44efe3e49e
Refactor LRU code to use part rather than part_id
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2020-12-17 14:35:27 +01:00
Adam Rutkowski
41a767de97
Multiple LRU lists
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2020-12-17 14:35:27 +01:00
Robert Baldyga
7af386681d
Merge pull request #418 from robertbaldyga/inc-dep-env-headers
...
Remove dependency to full ocf_env.h from inc/ headers
2020-11-30 17:16:32 +01:00
Robert Baldyga
b8735f6517
rbtree: Fix swapping out-of-tree node with root
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-11-30 15:58:18 +01:00
Robert Baldyga
c8e7e0053c
Remove dependency to full ocf_env.h from inc/ headers
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-11-19 13:07:16 +01:00
Robert Baldyga
8b03271626
rbtree: Introduce list find callback
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-11-10 13:21:14 +01:00
Robert Baldyga
0ae4f4b5b2
rbtree: Add equal nodes to linked list
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-11-10 13:21:14 +01:00
Robert Baldyga
50c4de0495
rbtree: Make swap resistant to nodes outside the tree
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-11-10 13:20:45 +01:00
Robert Baldyga
694224971c
rbtree: Replace spaces with tabs
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-11-09 17:32:03 +01:00
Robert Baldyga
1c9312842a
Merge pull request #369 from rafalste/copyright_update
...
Update copyright statements
2020-05-06 12:42:10 +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
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
935df23c74
Introduce red-black trees utility
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-03-24 18:17:15 +01:00
Michal Mielewczyk
d9c987e068
Flush metadata after changing status of each sector
...
In case of cleaning metadata used to be flushed only when status of whole cache
line changed to clean.
This patch ensures that metadata flush is triggered after changin status of each
single sector is cache line.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-01-24 11:27:56 -05:00
Michal Mielewczyk
2f10365086
Flush metadata after setting dirty status of each sector.
...
After second dirty write to cache line which was already dirty, metadata flush
was not triggered. In case of dirty shutdown, this led to data corruption.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-01-24 11:27:56 -05:00
Robert Baldyga
d1c2fc0c67
discard: Make max_length aligned to sector size
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-01-21 12:44:04 +01:00
Robert Baldyga
e06832426d
cleaner: Retrieve core object properly
...
Cleaner doesn't set core object in req as it works in domain of cache
lines, which may belong to various cores. It this case should retrieve
core object not from the req, but from the map instead.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-12-19 14:44:04 +01:00
Michal Mielewczyk
db06783d56
Fix cache stats updating.
...
When single request to cache was issued, stats updating function was called with
0 bytes as value to update. In case of many request issued to cache, stats were
updated only in case of error.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-10-08 08:49:24 -04:00
Robert Baldyga
f51f7f7e1e
Update stats before calling completion callback
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-10-02 18:49:59 +02:00
Michal Rakowski
2575be83fa
Error handling for env_rwsem_init added
...
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2019-09-30 17:16:37 +02:00
Michal Rakowski
b78557a2cc
Change env_spinlock_init to non-void function
...
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2019-09-30 17:15:27 +02:00
Michał Wysoczański
aafe870e44
Merge pull request #280 from arutk/metadata_sync_2
...
Additional metadata synchronization
2019-09-25 14:11:59 +02:00
Adam Rutkowski
be3b402162
Synchronization of collision table
...
Adding synchronization around metadata collision segment pages.
This part of metadata is modified when cacheline is mapped/unmapped
and when dirty status changes.
Synchronization on page level is required on top of cacheline
and hash bucket locks to assure metadata flush always reads
consistent state when copying entire collision table memory
page.
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-09-25 00:26:29 -04:00
Robert Baldyga
b8f5f135fe
ocf_async_lock: Replace mutex with spinlocks
...
The ocf_async_lock may be used in atomic context, thus we need
to replace synchronization primitives to non-sleeping variants.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-09-23 15:54:25 +02:00
Adam Rutkowski
d2bd807e49
Remove calls to OCF_METADATA_(UN)LOCK_WR(RD)
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-09-20 17:21:00 -04:00
Adam Rutkowski
f34cacf150
Move resume callback to async lock function params (refactoring)
...
This is a step towards common async lock interface in OCF.
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-09-20 17:21:00 -04:00
Michał Mielewczyk
f86287ef06
Merge pull request #261 from micrakow/coverity_19_9
...
Fixed some bugs found by the coverity tool
2019-09-17 09:25:18 +02:00
Michal Rakowski
83e23c5593
Fixed some bugs found by the coverity tool
...
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2019-09-16 15:49:37 +02:00
Michal Mielewczyk
c5edc60345
Fix stats update in cleaner.
...
Core is not assigned to request in cleaner, so to increase it's stats it has to
be retrieved from mapping.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-09-16 05:59:28 -04:00
Michal Mielewczyk
494a1ccc79
Extract stats builder utils to separate file.
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-09-12 05:21:17 -04:00
Michal Mielewczyk
01ce586e6a
Use API instead of raw variables to update block stats.
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-09-10 08:01:09 -04:00
Michal Mielewczyk
b4c384eb2d
Use API instead of raw variables to update error stats.
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-09-10 08:01:09 -04:00
Michal Mielewczyk
2450d3da4b
Move block stats counters to ioclass section.
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-09-09 02:46:45 -04:00
Firas Medini
1f979f630b
Adding synchronization primitives destroyers
...
Environment should provide calls for destroying primitives (i.e. env_mutex_destroy()) and OCF should call these functions in its cleanup paths.
Signed-off-by: Firas Medini <mdnfiras@yahoo.com>
2019-08-13 05:13:11 -07: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
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
Adam Rutkowski
7184f7787c
Cleanup map_info struct
...
1. Rename hash_key -> hash
2. Better comments for hash and coll_idx
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-07-24 13:12:05 -04:00
Jan Musiał
232f0cd8d7
Merge pull request #216 from robertbaldyga/io-and-req-in-single-allocation
...
Allocate io and req in single allocation
2019-07-23 11:40:30 +02:00
Jan Musial
917cbd859a
Add promotion policy API and use it in I/O path
...
Promotion policy is supposed to perform ALRU noise filtering by
eliminating one-hit wonders being added to cache and polluting it.
Signed-off-by: Jan Musial <jan.musial@intel.com>
2019-07-19 13:52:00 +02:00
Robert Baldyga
e64bb50a4b
Allocate io and request in single allocation
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-07-17 10:31:23 +02:00
Robert Baldyga
61414f889e
Introduce OCF IO allocator
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-07-17 10:31:23 +02:00