Robert Baldyga
17aa424319
Introduce cache bind operation
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-09-10 08:56:54 +02:00
Robert Baldyga
c0110a4d01
Introduce cache exported object
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-09-09 22:34:56 +02:00
Robert Baldyga
1dd8f12242
Rework exported object management functions
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-08-25 15:38:22 +02:00
Robert Baldyga
feb7134e34
Merge pull request #924 from jfckm/add_mq_blocking_config
...
Add config for BLK_MQ_F_BLOCKING flag
2021-08-20 10:21:11 +02:00
Robert Baldyga
a413e676e9
Merge pull request #925 from mmichal10/env-refactor
...
Env refactor
2021-08-20 10:20:17 +02:00
Robert Baldyga
1064cecbb9
Merge pull request #921 from mmichal10/remove-atomics
...
Remove remains of atomic writes support
2021-08-18 09:19:53 +02:00
Jan Musial
ac00bd503a
Add config for BLK_MQ_F_BLOCKING flag
...
Signed-off-by: Jan Musial <jan.musial@intel.com>
2021-08-18 09:04:15 +02:00
Michal Mielewczyk
5e4fcb62be
env: refactor rwmutex
...
All the operations on `count` are performed under the lock thus it doesn't need
to be atomic.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-08-17 15:52:25 +02:00
Michal Mielewczyk
39bab9ad87
env: simplify env_rwsem
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-08-17 15:52:25 +02:00
Michal Mielewczyk
c68de77799
Remove remains of atomic writes support
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-08-16 16:01:21 +02:00
Robert Baldyga
3983cea2b5
Fix cache_priv deallocation
...
Since cache_priv is allocated with vmalloc() it should be deallocated
with vfree().
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-08-16 05:16:15 +02:00
Robert Baldyga
c968285d9f
Remove upgrade-in-flight feature
...
Due to changes in Linux kernel this feature is not working anymore.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-08-11 20:33:16 +02:00
Michal Mielewczyk
a6d3c70b1d
Async API for switching cleaning policy
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-07-27 16:15:09 +02:00
Robert Baldyga
2e4c460702
Use cache line size as discard granularity
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-07-15 22:47:08 +02:00
Robert Baldyga
2a35bd09be
Introduce lazy helper thread abstraction to avoid hung task
...
Some helper threads are created at the very beginning of cache start/stop
operations, but they are used only after OCF start/stop finishes, which
may take significant amount of time. Kernel by default creates threads
that wait for the first wake up in uninterruptible state, which may trigger
hung task warning if the first wake up is called more than 120 seconds
after thread creation. To mitigate this problem we create lazy thread
abstraction that waits for a wake up in interruptible state.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-07-13 10:07:25 +02:00
Robert Baldyga
517d98a6ed
Split big IO requests
...
OCF cannot allocate request map bigger than 4MiB (due to kmalloc
limitations), thus we need to split bigger IOs into series smaller
ones to reduce request map size.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-07-07 18:52:22 +02:00
Robert Baldyga
34dbbc056d
Fix exported object deinitialization
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-06-24 14:24:04 +02:00
Kozlowski Mateusz
62f4c61f8e
Update mpool API for vol_atomic_dev_bottom
...
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
2021-06-23 14:57:21 +02:00
Adam Rutkowski
7aa883dbd3
OCF update (removed configurable eviction policy)
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-06-21 22:56:51 +02:00
Kozlowski Mateusz
647124895f
Update OCF
...
Remove metadata updater
Update mpool API
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
2021-06-21 21:57:10 +02:00
Robert Baldyga
e5e0697da4
Add support for kernel 5.11
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-06-15 18:59:08 +02:00
Robert Baldyga
2d7b94fa21
Remove block_dev_start_bio()
...
Now submit_bio path has no fallback to request queue, so we can simplify
io accounting.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-06-15 18:59:08 +02:00
Robert Baldyga
62eb6dc3fd
Remove unused functions from top volume
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-06-15 18:59:08 +02:00
Robert Baldyga
5e17d0833f
Remove unused callbacks from cas_disk ops
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-06-15 18:59:08 +02:00
Robert Baldyga
7f89e59b1a
Remove CAS_FLUSH_SUPPORTED
...
It's defined on every single supported kernel, so there is actually no need
for this define at all.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-06-15 18:59:08 +02:00
Robert Baldyga
b82b338c53
Remove blk request handling path
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-06-15 18:59:08 +02:00
Robert Baldyga
7343cb55fa
Handle all io on bio handler
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-06-15 16:52:35 +02:00
Robert Baldyga
fbc3906576
Replace removed kernel API function with new one
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-05-26 23:35:30 +02:00
Slawomir Jankowski
964877ddd6
Typo fix
...
Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2021-05-13 17:02:05 +02:00
Slawomir Jankowski
9e7f163216
Cleanup exported object queue
...
This patch fixes adding core after core addition failure.
The queue wasn't cleaned before and following core addition cannot
re-initialize queue properly.
Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2021-05-13 17:01:41 +02:00
Robert Baldyga
a226b39c4e
Merge pull request #811 from mmichal10/fix-discard
...
Fix max discard size
2021-05-10 15:36:37 +02:00
Michal Mielewczyk
0387ba18d7
Fix max discard size
...
`blk_queue_max_discard_sectors()` accepts 32bit parameter
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-05-07 11:14:46 +02:00
Michal Mielewczyk
0e8758528b
Return mempool instead of enum
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-04-22 14:17:39 +02:00
Adam Rutkowski
9c08ed4b87
Set proper multiqueue flags
...
Setting BLK_MQ_F_STACKING (to indicate stacked device) and
BLK_MQ_F_BLOCKING (to indicate potentially blocking operations
like acquiring mutex or GFP_NOIO allocations).
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-04-16 22:52:18 -05:00
Robert Baldyga
c46c638e2e
Merge pull request #802 from arutk/stop_error_handling
...
Properly handle flush error in cache stop
2021-04-15 18:11:47 +02:00
Adam Rutkowski
da0dda2dbd
Properly handle flush error in cache stop
...
In case of initial flush error stop is aborted. In case
of failure during the second flush, appropriate error
message is presetned to the user.
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-04-15 18:11:23 -05:00
Michal Mielewczyk
4e680bb50a
Reorganize remove-inacitve
command
...
Don't remove inactive core if it has dirt cache lines assigned unless `force`
flag is specified.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-04-12 13:48:28 +02:00
Michal Mielewczyk
083d6fe93e
Clean-up 'remove-core' command
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-04-09 19:57:07 +02:00
Kozlowski Mateusz
a45f0c854f
Fix _blockdev_set_bio_data iteration
...
The data->size field can be initialized to a lower value than bio->bi_vcnt,
if the bio is split. The bio_for_each_segment then iterates based on the original
indexes and the mismatch eventually causes a BUG_ON.
Fixes #714
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
2021-04-08 12:28:35 +02:00
Adam Rutkowski
048f25379b
Check dirty status in case of metadata mismatch
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-04-06 15:37:44 -05:00
Kozlowski Mateusz
ab0a7e0a44
Add detection of ktime_get_real_ts64 vs getnstimeofday
...
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
2021-03-26 13:46:09 +01:00
Slawomir Jankowski
eef4e49904
Use time since epoch instead of jiffies
...
If time is counted in jiffies, machine reboot brokes `dirty for`
statistic for caches loaded at boot. The counter overflows and
`dirty for` shows some huge values.
Cast ticks to unsigned long.
Add necessary header.
Move `env_msleep` to `TIME` subgroup of header.
Move `env_time_after` below time converting functions.
Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2021-03-26 13:46:09 +01:00
Kozlowski Mateusz
74ca3daa37
Classifier alignment
...
Move lock to a different cacheline to avoid trashing
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
2021-03-22 08:26:55 +01:00
Kozlowski Mateusz
da9a6204d3
General structure packing
...
Pack often used structures, so that less memory/cachelines are used
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
2021-03-22 08:26:55 +01:00
Kozlowski Mateusz
c751974ae0
Allocator structures cacheline alignment
...
Align atomic fields to a different cacheline, so no false sharing between
CPUs occur.
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
2021-03-22 08:26:55 +01:00
Robert Baldyga
880cfadde9
Makefile: improve uninstall error handling
...
Introduce helper functions to handle uninstall errors gracefully.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-03-19 15:37:55 +01:00
Michal Mielewczyk
f1c34340e0
Change REMOVE_INACTIVE
ioctl type
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-03-12 09:21:49 +01:00
Michal Mielewczyk
12db6b4443
Remove redundant cache being stopped
check
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-03-12 09:20:19 +01:00
Slawomir Jankowski
461a4f2d96
Introduce "remove inactive core" to cas_cache module
...
Create module-side handling of inactive core removal.
Extract core functionality of core removal that applies to inactive core
and copy it to `cache_mngt_remove_inactive_core` function.
Return proper error if core is active.
Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2021-03-10 14:39:07 +01:00
Slawomir Jankowski
696a2e175c
Add KCAS_IOCTL_REMOVE_INACTIVE
request to cas_cache module
...
Add IOCTL code and struct for above request.
Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2021-03-10 14:39:07 +01:00