Spdk/test/unit/lib/reduce/reduce.c
Alexey Marchuk b86e85f56f lib/reduce: Properly allocate comp/decomp buffers
Reduce library allocates one big chunk of memory and
then splits it between requests. The problem is that
a chunk of memory assigned to a request may cross huge
page boundary and if compress driver doesn't support
SGL input of output, operation will be failed.
To avoid this problem, align buffer start on 2MiB
and check each chunk of memory if it crosses huge page
boundary.

Fixes issue #2454

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: Ie730b8ba928f27a43bde1222b6c18d29b797575a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12249
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
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>
2022-05-20 17:39:57 +00:00
..
Makefile test/unit: remove duplicate mk/spdk.common.mk includes 2019-02-11 09:30:27 +00:00
reduce_ut.c lib/reduce: Properly allocate comp/decomp buffers 2022-05-20 17:39:57 +00:00