Commit Graph

1468 Commits

Author SHA1 Message Date
Robert Baldyga
8b1caf5457
Merge pull request #541 from mmichal10/fix-cleaning
Sync cleaning deinit with running new iterations
2021-07-27 16:01:11 +02:00
Michal Mielewczyk
1620c544a1 pyocf: update cleaning policy switching test
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-07-27 15:44:33 +02:00
Michal Mielewczyk
a94677f433 Fix cleaning UT
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-07-27 15:44:33 +02:00
Michal Mielewczyk
b83da68f85 Cleaner context ref counter
To prevent deinitializing cleaner context (i.e. during switching policy) during
processing requests, access to cleaner should be protected with reference
counter

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-07-27 15:44:33 +02:00
Michal Mielewczyk
f33a6e5ce0 Make switching cleaning policy asynchronous
Making the operation asynchronous will allow to use refcnt utility as an
synchronization mechanism between processing cachelines and deinitializing
cleaning policy.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-07-27 15:44:18 +02:00
Michal Mielewczyk
26194fc536 Use cleaning ops wrapper functions
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-07-27 15:44:18 +02:00
Michal Mielewczyk
00aa56dd28 Wrapper functions for cleaning ops
The change should unify access to cleaning policy resources and facilitate
synchronization when switching cleaning policies

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-07-27 15:44:18 +02:00
Michal Mielewczyk
6dc29ee85e Refactor includes
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-07-27 15:44:18 +02:00
Michal Mielewczyk
92f9c3d532 UT framework: fix misspelled variable name
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-07-27 15:44:18 +02:00
Robert Baldyga
f04c181039
Merge pull request #543 from mmichal10/fix-memleak
Deinit sequential cutoff on core removal
2021-07-27 10:33:09 +02:00
Michal Mielewczyk
c6fe2fc3f9 Deinit sequential cutoff on core removal
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-07-26 16:20:17 +02:00
Robert Baldyga
227021b416
Merge pull request #540 from mmkayPL/add-back-fastpath
Add back fastpath
2021-07-21 14:58:58 +02:00
Kozlowski Mateusz
bd7a89c819 Single map alloc location
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
2021-07-21 08:27:27 +02:00
Kozlowski Mateusz
af1f3d73c2 Add back fastpath
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
2021-07-21 08:27:25 +02:00
Kozlowski Mateusz
ec4bea4fc0 Add missing ocf_io_put to error path in ocf_core_volume_submit_io
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
2021-07-21 08:26:31 +02:00
Robert Baldyga
3adc94f41f
Merge pull request #539 from robertbaldyga/fix-pending-misses-stack-overflow
Avoid stack overflow when pending read misses list is blocked
2021-07-14 15:19:01 +02:00
Robert Baldyga
a2b300d465 Avoid stack overflow when pending read misses list is blocked
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-07-14 13:04:03 +02:00
Robert Baldyga
740bf06c4b
Merge pull request #538 from robertbaldyga/fix-next-inval-getter
Fix helper function getting next invalid cache line
2021-07-14 10:17:39 +02:00
Robert Baldyga
be1ac09c17 Fix helper function getting next invalid cache line
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-07-13 18:56:52 +02:00
Robert Baldyga
83e01e8f6e
Merge pull request #537 from mmkayPL/cl-user-partitions-count
Fix remap line count for user partitions
2021-07-13 11:07:44 +02:00
Kozlowski Mateusz
8c3ed42fa2 Fix remap line count for user partitions
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
2021-07-12 16:49:14 +02:00
Robert Baldyga
7b5084b21e
Merge pull request #536 from robertbaldyga/fix-arg-order
Fix argument order in ocf_metadata_set_partition_id() call
2021-07-12 10:02:28 +02:00
Robert Baldyga
f538bbd3ae Fix argument order in ocf_metadata_set_partition_id() call
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-07-09 21:31:06 +02:00
Robert Baldyga
d79c4b7dc9
Merge pull request #535 from mmkayPL/struct-alignment
Align structures to cacheline
2021-07-08 13:26:57 +02:00
Kozlowski Mateusz
f494448f97 Align structures to cacheline
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
2021-07-08 12:46:39 +02:00
Robert Baldyga
b5ed58f597
Merge pull request #534 from mmichal10/unlock-remapped
Unlock cachelines after failed remap
2021-07-06 16:18:55 +02:00
Michal Mielewczyk
a394dd06a8 Unlock cachelines after failed remap
All remapped cachelines are write locked. If the operation fails cachelines has
to be unlocked during rollback

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-07-06 15:09:50 +02:00
Robert Baldyga
f863bb627f
Merge pull request #533 from arutk/populate_reschedule
restore conditional reschedule during freelist population
2021-07-02 13:07:05 +02:00
Adam Rutkowski
96dfd87572 restore conditional reschedule during freelist population
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-07-02 11:37:49 +02:00
Robert Baldyga
aa3677da10
Merge pull request #530 from arutk/remove_eviction
Remove remaining stale references to "eviction" and "evp"
2021-06-30 09:47:35 +02:00
Robert Baldyga
43a142ccdd
Merge pull request #531 from arutk/fix_remove_dirty
fix removing dirty core
2021-06-29 09:36:45 +02:00
Michal Mielewczyk
98d2ce0264 pyocf: test for removing dirty core
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-06-28 17:40:49 +02:00
Adam Rutkowski
a1ec40ce10 Fix ocf_lru_repart for freelist partition
ocf_lru_get_list() now returs clean list for freelist partition to
provide common interface regardless of partition type.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-06-28 17:39:31 +02:00
Robert Baldyga
b9f160b177
Merge pull request #526 from robertbaldyga/fix-unlock-after-invalid
Unlock request after invalidating cache lines
2021-06-28 13:50:40 +02:00
Adam Rutkowski
a7581b892c Rename evp_iter to lru_iter in concurrency
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-06-26 19:09:10 +02:00
Adam Rutkowski
d029b2a2be Remove unused pending_eviction_clines counter
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-06-26 19:09:10 +02:00
Adam Rutkowski
a9ab5fbafd Fix comments in ocf_engine_common.h
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-06-26 19:09:09 +02:00
Adam Rutkowski
1a5d20156e Renamve eviction_idx to lru_idx
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-06-26 19:09:08 +02:00
Adam Rutkowski
fc06ef92a0 Remove obsolete wrapper for lru_rm_cline
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-06-26 19:09:04 +02:00
Adam Rutkowski
ab74ce07df Remove accidentaly included ocf_persistent_metadata_ops
This struct was not meant to be merged to master

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-06-26 18:08:29 +02:00
Adam Rutkowski
3775ab0e37 fix debug logs in cacheline concurrency UT tests
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-06-26 16:55:25 +02:00
Robert Baldyga
059b845df8 Unlock request after invalidating cache lines
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-06-25 17:50:38 +02:00
Robert Baldyga
99be26cefd
Merge pull request #518 from mmichal10/reorder-md-flush
Reorder metadata updating patter in WB mode
2021-06-23 12:47:44 +02:00
Michal Mielewczyk
f0564dcf75 Avoid unnecessary metadata flushes in WT
Flushing metadata in WT is required only if at least of the request's cacheline
changed its state to clean.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-06-23 09:51:16 +02:00
Michal Mielewczyk
c9294d1f06 Reorder metadata updating pattern in WT mode
There's a possibility that WT write is performed to dirty cache line (i.e. after
switching WB->WT without flush) and status bits change from dirty to clean. If
power failure occurs it might happen that recovery would ignore recent data from
cache and would assume that data is clean while backend storage data is out of
date.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-06-22 15:35:50 +02:00
Michal Mielewczyk
0192ce23dd Reorder metadata updating patter in WB mode
In WB mode metadata should be updated only if the actuall data had been saved
on disk. Otherwise metadata might be flushed too early and consequently data
corruption might occur.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-06-22 09:04:56 +02:00
Robert Baldyga
847f5f1174
Merge pull request #520 from arutk/lru_refactor
LRU refactoring
2021-06-21 22:49:08 +02:00
Adam Rutkowski
1e1955b833 lru refactor
rearanging lru implementation for easier journaling

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-06-21 22:32:57 +02:00
Robert Baldyga
f2414af7b9
Merge pull request #524 from arutk/mio_lock_in_thread
Move metadata I/O lock to IO queue context
2021-06-21 21:59:46 +02:00
Adam Rutkowski
edf20c133e Move metadata I/O lock to IO queue context
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-06-21 21:39:35 +02:00