Commit Graph

1667 Commits

Author SHA1 Message Date
dependabot[bot]
ddb8dcaee2
build(deps): bump tj-actions/changed-files in /.github/workflows
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 18.2 to 41.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v18.2...v41)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-02 16:44:24 +00:00
Robert Baldyga
a7a62cb44a
Merge pull request #779 from robertbaldyga/posix-env_bit_test-fix
env: posix: Make env_bit_test() atomic
2023-09-21 13:55:32 +02:00
Robert Baldyga
5522d19718 env: posix: Make env_bit_test() atomic
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
Signed-off-by: Shai Fultheim <shai.fultheim@huawei.com>
2023-09-20 16:52:07 +02:00
Robert Baldyga
37bae0ec47
Merge pull request #777 from robertbaldyga/fix-req-unlock-pt
Unlock request in PT using ocf_req_unlock()
2023-09-14 09:10:26 +02:00
Robert Baldyga
d57c9bb51d Unlock request in PT using ocf_req_unlock()
There are situations when we can end up in engine_pt with cache lines
locked for write. One example is engine_rd falling back to engine_pt after
failure during cache line preparation, where write lock has been already
taken. To handle this situation properly, unlock request using more general
unlock function.

Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2023-09-13 17:04:06 +02:00
Robert Baldyga
016d7a8ee2
Merge pull request #776 from robertbaldyga/update-maintainers-email
Update maintainer's email address
2023-05-11 10:11:57 +02:00
Robert Baldyga
0d45ac0674 Update maintainer's email address
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2023-05-10 14:53:47 +02:00
Robert Baldyga
80289f1d2f
Merge pull request #775 from robertbaldyga/remove-intel-support
Remove information suggesting Intel support
2023-04-26 11:04:06 +02:00
Robert Baldyga
b9a5baa347 Remove information suggesting Intel support
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2023-04-26 09:37:55 +02:00
Robert Baldyga
e09463054d
Merge pull request #771 from robertbaldyga/cache-is-initializing
Add OCF API ocf_cache_is_initializing
2023-04-17 20:38:14 +02:00
Robert Baldyga
f3878a86e1
Merge pull request #770 from robertbaldyga/fix-priv-alignment
Fix alignment of private data in parallelize & pipeline
2023-04-17 20:37:56 +02:00
Robert Baldyga
83477bdcf9
Merge pull request #769 from robertbaldyga/pyocf-fix-random-string
tests: Use proper random object for string generation
2023-04-17 20:37:38 +02:00
Amir Haroush
041df202b8 Fix alignment of private data in parallelize & pipeline
there is an issue when someone call to parallelize/pipeline
with some struct that is aligned (say to 64B)
but these APIs add their own data, right before
the user's private data.
so, the user's data is no longer aligned
which might cause segfault in some cases.

Signed-off-by: Amir Haroush <amir.haroush@huawei.com>
Signed-off-by: Shai Fultheim <shai.fultheim@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2023-04-17 20:35:38 +02:00
Amir Haroush
6cb1ff71c2 Add OCF API ocf_cache_is_initializing
Signed-off-by: Amir Haroush <amir.haroush@huawei.com>
Signed-off-by: Shai Fultheim <shai.fultheim@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2023-03-30 10:34:05 +02:00
Robert Baldyga
2560aa709c tests: Use proper random object for string generation
PyOCF needs to control random seed, to allow running tests with
pytest-xdist. Use local random object initialized with seed
from the config.

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2023-03-30 10:30:55 +02:00
Robert Baldyga
64a46a78cb
Merge pull request #767 from robertbaldyga/fix-segfault
Fix segfault when copy unaligned struct as aligned
2023-03-28 10:09:28 +02:00
Amir Haroush
22a697d09e Fix segfault when copy unaligned struct as aligned
Because context has one field which is aligned to 64B
(struct ocf_volume cache_volume) the compiler use vmovdqa (aligned)
instead of vmovdqu (unaligned) in reality the address is not 64 aligned,
it ends with 0x8, so we get this segfault.

Signed-off-by: Amir Haroush <amir.haroush@huawei.com>
Signed-off-by: Shai Fultheim <shai.fultheim@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2023-03-28 09:32:33 +02:00
Robert Baldyga
a05a49a886
Merge pull request #766 from Svelar/master
utils_refcnt_register_zero_cb.c: fix typos
2023-01-23 08:36:31 +01:00
Svelar
3fe63b3036 tests/unit/tests/utils/utils_refcnt.c/utils_refcnt_register_zero_cb.c: fix typos
Signed-off-by: Svelar <sunrongqi@huawei.com>
2023-01-04 16:01:29 +08:00
Robert Baldyga
c6071bbbb4
Merge pull request #760 from robertbaldyga/license-check-on-relase-branches
Enable "Licence-date-verification" check on release branches
2022-11-22 20:25:00 +01:00
Robert Baldyga
d0bfa94853
Merge pull request #761 from DocentSzachista/remove-ocf-io-start
remove ocf_io_start function
2022-10-31 12:22:19 +01:00
Damian Raczkowski
d2ea41cdbc remove ocf_io_start function
Signed-off-by: Damian Raczkowski <damian.raczkowski@intel.com>
2022-10-28 15:03:36 +02:00
Robert Baldyga
f69b91ae25 Enable "Licence-date-verification" check on release branches
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-10-17 12:31:37 +02:00
Robert Baldyga
43894dd4a5
Merge pull request #759 from live4thee/add-copyright-line
update copyright line as per requested
2022-10-10 13:52:01 +02:00
David Lee
004e930a9f update copyright line as per requested
Signed-off-by: David Lee <live4thee@gmail.com>
2022-10-09 22:30:36 +08:00
Robert Baldyga
4314e8eb13
Merge pull request #757 from live4thee/alru/add-dirty-ratio
alru: add parameter `max_dirty_ratio'
2022-10-07 15:14:24 +02:00
David Lee
6184ad7759 alru: add parameter `max_dirty_ratio'
With a high dirty ratio and occupancy, OCF might unable to map cache lines
for new requests, thus pass-through the I/O to core devices.  IOPS will
drop afterwards.  We need to control the dirty ratio.

Existing `alru' policy gives user the chance to control the stale buffer
time, activity threshold etc.  They can affect the dirty ratio of the cache
device, but in an empirical manner, more or less.  Introducing
`max_dirty_ratio' can make it explicit.

At first glance, it might be better to implement a dedicated cleaner policy
directly targeting dirty ratio goal, so that the `alru' parameters remains
orthogonal.  But one the other hand, we still need to flush dirty cache
lines periodically, instead of just keeping a watermark of dirty ratio.
It indicates that existing `alru' parameters are still required if we
develop a new policy, and it seems reasonable to make it a parameter.

To sum up, this patch does the following:
- added a 'max_dirty_ratio' parameter with default value 100;
- with default value 100, `alru' cleaner is identical to what is was;
- with value N less than 100, the cleaner (when waken up) will active
  brought dirty ratio to N, regardless of staleness time.

Signed-off-by: David Lee <live4thee@gmail.com>
2022-10-01 17:48:14 +08:00
David Lee
d6b0fbceac a few typo fixes
Signed-off-by: David Lee <live4thee@gmail.com>
2022-10-01 17:48:07 +08:00
Robert Baldyga
15c2986b8d
Merge pull request #756 from mmichal10/speedup-start
Speedup cache initialization
2022-09-29 10:17:29 +02:00
Michal Mielewczyk
7b8093aa34 Refactor cleaning policies initialization
Don't populate cleaning policies during initialization procedure so the user
has to call the latter explicitly.

Until now cleaning policies could be populated in two ways:
- implicitly during cleaning policy initialization,
- explicitly be calling populate.
The difference was that the former was single threaded.

This patch removes the functionally redundant and less efficient code.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2022-09-26 14:14:40 +02:00
Michal Mielewczyk
c0e99e1f79 cleaning: rename recovery to populate
The function not only recovers cleaning policy metadata but is also utilized
to initialize data structures so more generic name is actually more accurate

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2022-09-26 14:14:40 +02:00
Michal Mielewczyk
8faf74169a Parallelize initializing hash table
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2022-09-26 14:14:40 +02:00
Michal Mielewczyk
4dbf740f5b Parallelize initializing collision section
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2022-09-26 14:14:40 +02:00
Michal Mielewczyk
b50bd1b506 Initialize metadata structures in pipelines
Initializing metadata in an asynchronous manner will allow to use
parallelization utilities in the future commits

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2022-09-26 14:06:40 +02:00
Michal Mielewczyk
da67112b17 load: init_structures as a separate step
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2022-09-26 14:06:40 +02:00
Michal Mielewczyk
f8e8d74539 attach: setup promotion policy before cleaning
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2022-09-26 14:06:40 +02:00
Michal Mielewczyk
ca70ea3fff Deinit cleaning policy if attaching cache failed
Normally cleaning policy would be deinitialized during stopping cache which is
one of steps of error handling e.g in case of failed cache activation. But since
`cache_stop()` may be called only for an attached cache instance, cleaning
policy needs to deinitialized explicitly.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2022-09-26 14:06:40 +02:00
Michal Mielewczyk
21d5da83d9 A utility for counting queues
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2022-09-26 14:06:40 +02:00
Michal Mielewczyk
ef997b47fa Fix whitespaces
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2022-09-23 07:09:41 +02:00
Michal Mielewczyk
ca9d8072df posix env: assert in rwsem unlock
Instead of ignoring `pthread_rwlock_unlock()` return value assert that is must
succeed.

The function returns an error eg. when there is an attempt to unlock the
resource from a different thread than it was originally locked which is illegal
in userspace.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2022-09-23 07:09:41 +02:00
Robert Baldyga
e9a3ebe460
Merge pull request #746 from pdebski21/fix_debug_kernel_stack_overflow
Stack memory reduction for OCF stats
2022-09-09 09:00:03 +02:00
Robert Baldyga
9ad308d84f
Merge pull request #714 from rafalste/copyright_header_check_improvements
Copyright header check improvements
2022-09-09 08:53:13 +02:00
Robert Baldyga
1c701e4101
Merge pull request #750 from robertbaldyga/remove-req-io-if
Get rid of req->io_if
2022-09-08 22:59:57 +02:00
Rafal Stefanowski
de863c7ec1 copyright/license: Extend file header check
- tighten the copyright regex to include all necessary info
- add checking for proper license identifier
- output only in case of error and put it in stderr

Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2022-09-08 13:13:18 +02:00
Rafal Stefanowski
46229dceed copyright/license: Improve checking for copyright header
Besides looking for files with proper extension, check also listed
files without extension, which should contain this header as well.

Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2022-09-08 13:13:18 +02:00
Rafal Stefanowski
9d7f4becb8 copyright/license: Add missing copyright header
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2022-09-08 13:13:18 +02:00
Robert Baldyga
8db2f1117b
Merge pull request #754 from rafalste/copyright_exclude_renamed
Exclude renamed and copied files from copyright check
2022-09-08 12:27:44 +02:00
Rafal Stefanowski
fbc612d2f5 Exclude renamed and copied files from copyright check
Only added or modified files will be checked for a proper
copyright statement.

Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2022-09-08 11:09:56 +02:00
Robert Baldyga
228c5fc891 Get rid of req->io_if
Remove one callback indirection level. I/O never changes it's direction
so there is no point in storing both read and write callbacks for each
request.

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-09-07 23:07:04 +02:00
Robert Baldyga
d0d1db0b8d
Merge pull request #748 from arutk/fas
fix potential out of bound access in req->alock_status manipulation
2022-09-07 17:05:14 +02:00