6984eff3 | 07-Mar-2023 |
Amir Haroush <amir.haroush@huawei.com> |
ocf: fix env_ticks_to_{msec,usec,nsec} precision & accuracy
- fix precision when one convert to seconds and then multiply we can have precision errors for example if one have 77ms, it will go to
ocf: fix env_ticks_to_{msec,usec,nsec} precision & accuracy
- fix precision when one convert to seconds and then multiply we can have precision errors for example if one have 77ms, it will go to 0 when converted to seconds and then multiply that 0 by 1000 will return 0 instead of 77ms.
- fix mismatch nsec/usec nsec was multiplied by 1000*1000 while usec by 1000*1000*1000 it should be the opposite. anyway the implementation had changed.
- implementation description * env_ticks_to_msec: j / (tick_hz / 1000) this is exactly the same as (j * 1000) / tick_hz (eq #2). but this implementation (eq #2) can only handle 54b in j (before overflowing) because of the multiplication by 1000 (10b). with the correct implementation we use all 64b in j. we assume that tick_hz will be prefectly divisible by 1000 so we are ok.
* env_ticks_to_usec: j / (tick_hz / (1000 * 1000)) same as in msec case, we use all 64b in j. here we assume that tick_hz is perfectly divisible by (1000 * 1000) i.e. we assume that CPU frequency is some multiple of 1MHz.
* env_ticks_to_nsec: (j * 1000) / (tick_hz / (1000 * 1000)) in this case we can't assume that tick_hz is divisible by 10^9 because there are many CPUs with 2.8GHz or 3.3GHz for example. so we multiply j by 1000 this means that we can only handle correctly j up to 54b. (64b - 10b, 10b for the *1000 operation)
Signed-off-by: Amir Haroush <amir.haroush@huawei.com> Signed-off-by: Shai Fultheim <shai.fultheim@huawei.com> Change-Id: Ia8ea7f88b718df206fa0731e3f39f419ee922aa7 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17078 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
show more ...
|
7c7267e9 | 07-Mar-2023 |
Amir Haroush <amir.haroush@huawei.com> |
ocf: fix env atomic64 functions arguments and return types
atomic64 functions should operate with atomic64 and long types.
Signed-off-by: Amir Haroush <amir.haroush@huawei.com> Signed-off-by: Shai
ocf: fix env atomic64 functions arguments and return types
atomic64 functions should operate with atomic64 and long types.
Signed-off-by: Amir Haroush <amir.haroush@huawei.com> Signed-off-by: Shai Fultheim <shai.fultheim@huawei.com> Change-Id: I2ea8f1cc06d6df0f7dd5b9d628839138b78bc412 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17077 Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
show more ...
|
3f4474d5 | 09-Aug-2021 |
Michal Mielewczyk <michal.mielewczyk@intel.com> |
Update ocf to 21.6
- remove metadata updater - handle 'zero' flag in mempool allocator - adapt ocf_mngt_cache_start() to new OCF API
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com> S
Update ocf to 21.6
- remove metadata updater - handle 'zero' flag in mempool allocator - adapt ocf_mngt_cache_start() to new OCF API
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com> Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com> Change-Id: I34afd856cc1306ffe305f71a445e7474c9b0a2d9 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9129 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
show more ...
|
d7a3a052 | 09-Apr-2020 |
Vitaliy Mysak <vitaliy.mysak@intel.com> |
ocf: update ocf submodule to v20.3
New OCF version is ready, so update our submodule. There were a lot of API changes so we need to adjust our bdev/ocf and lib/ocf_env code.
Description of code cha
ocf: update ocf submodule to v20.3
New OCF version is ready, so update our submodule. There were a lot of API changes so we need to adjust our bdev/ocf and lib/ocf_env code.
Description of code changes: - env: added small functions like ENV_BUILD_BUG_ON, env_vzalloc_flags - env: added "destroy" method for all locks - env: added "execution context" interface - cache/core "id" field made private - signature of "ocf_io_configure" changed - "io->volume" field made private
List of changes to OCF is available at https://github.com/Open-CAS/ocf/releases But no new features were implemented for our OCF module since 19.6
Change-Id: I1ac2b6db0aad2a9840e4fa73d65608c5638fcb23 Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1801 Community-CI: Mellanox Build Bot Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
show more ...
|