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>
Since kernel 5.7 kallsyms_on_each_symbol() is not available.
NOTE: This affects ability to perform upgrade in flight on kernels 5.7+.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
If we run 'make kernelversion' in a read-only dir then it produces
mkdir: cannot create directory ‘.tmp_1056416’: Permission denied
mkdir: cannot create directory ‘.tmp_1056420’: Permission denied
mkdir: cannot create directory ‘.tmp_1056421’: Permission denied
mkdir: cannot create directory ‘.tmp_1056423’: Permission denied
warnings. To avoid it we need to specify where the source (and build)
directory located.
Closes#540
Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Since commit 8b3238cabd50e27 in linux kernel removed blk_bidi_rq() marco, it
has to be wrapped in CAS `configure` script
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
Currently configure script doesn't support any logging mechanism. To make easy
debugging possible, output from all failed compilation attempts is stored.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
Allows for faster configuration in known environments
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
1. When generating cas_blk_rq_append_bio, check whether a
version with double pointer compiles successfully. This
is a better criteria than the version with single pointer
since the latter may compile successfully regardless of
kernel blk_rq_append_bio prototype.
2. Always provide single pointer to cas_blk_rq_append_bio
macro - its up to cas_blk_rq_append_bio implementation to
decide whether extra level of indirection is needed.
This fixes compilation with kernel 4.14.98.
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
KERNEL_DIR environment variable can be used to configure
and make CAS with custom kernel source path.
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
To prevent using macros before they are defined, enfoce calling them in an
appropriate order.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
Functions and macros dependent on different kernel versions are now generated
before compilation basing on current kernel capabilities instead of hardcoding
them for specific kernels.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>