Commit Graph

23 Commits

Author SHA1 Message Date
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
Jan Musial
f1a19363e5 Include mpool in env and use new allocator API
Signed-off-by: Jan Musial <jan.musial@intel.com>
2021-03-05 14:02:08 +01:00
Jan Musial
bcc55f4f3c Extend allocator API
Create function for directly changing the size of rpool backing created
allocator.

Signed-off-by: Jan Musial <jan.musial@intel.com>
2021-03-03 11:17:22 +01:00
Rafal Stefanowski
43f43068ad Update copyright statements (2021)
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2021-01-21 13:15:38 +01:00
Robert Baldyga
ca3e1a5984 Revert "modules: use si_mem_available() when possible"
This method produced too optimistic free memory value, which in result
led to oom killer activation. This patch restores more conservative
free memory calculation method.

This reverts commit 1e9b7a4262.

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-01-14 15:16:09 +01:00
Robert Baldyga
2753bad018
Merge pull request #568 from mmichal10/occupancy-per-ioclass
Occupancy per ioclass
2020-12-23 14:36:02 +01:00
Michal Mielewczyk
36cf52940b env: print format for 64 bits signed int
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-12-23 07:23:02 -05:00
Robert Baldyga
ca7f809965 configure: Add __vmalloc() wrapper
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-12-22 11:33:38 +01:00
Robert Baldyga
1e25420f86
Merge pull request #404 from rafalste/copyright_update
Update copyright statements
2020-05-19 11:25:11 +02:00
Rafal Stefanowski
44b4020cc1 Update copyright statements
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2020-05-04 16:47:38 +02:00
Michal Rakowski
1e9b7a4262 modules: use si_mem_available() when possible
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2020-04-29 11:05:41 +02:00
Adam Rutkowski
e1a7c7f7e8 env: implement vmalloc with GFP flags
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2020-02-14 14:30:12 +01:00
Adam Rutkowski
aec95d70c9 Add ENV_BUILD_BUG_ON macro to kernel environment
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2020-02-10 16:25:35 -05:00
Adam Rutkowski
9b8fdde201 Relax allocations requirements
CAS does not need atomic alocations virtually anywhere. GFP_NOIO
should be sufficient in IO path. When allocation buffers during
module initialization use GFP_KERNEL.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-10-23 16:04:27 -04:00
Adam Rutkowski
e91e58ef66 Revert "env: implement vmalloc with GFP flags"
This reverts commit c5165838e5.
2019-10-18 19:18:31 -04:00
Adam Rutkowski
c5165838e5 env: implement vmalloc with GFP flags
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-10-18 17:35:29 -04:00
Michal Rakowski
4cbf555793 OCF update
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2019-10-01 10:32:03 +02:00
Adam Rutkowski
c9339d1b2f Add spin_trylock to environment
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-09-10 19:28:42 -04:00
Adam Rutkowski
7a0f8187cd Add get/put execution context to environment
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-09-10 19:28:42 -04:00
Jan Musial
dd8639316a Fix wrong fcn signature in OCF env
Signed-off-by: Jan Musial <jan.musial@intel.com>
2019-09-02 13:41:30 +02:00
Michal Mielewczyk
641902fb90 Implement synchronization primitives destroyers.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-08-19 02:34:54 -04:00
Adam Rutkowski
79eb92cd9a Implement secure alloc/free using vmalloc/vfree
In kernel there is no point in mlocking and zeroring memory
before freeing.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-04-18 18:04:57 -04:00
Robert Baldyga
94e8ca09e0 Initial commit
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-03-29 08:45:50 +01:00