FTL: Make L2P caching default mode

Flat L2P (all L2P in memory) needs to be specifically built against, due
to large memory consumption for big devices.

Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: Ib8906e10868455f88725b69b2b033b70a9f7256c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13358
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Kozlowski Mateusz 2022-06-01 15:18:03 +02:00 committed by Ben Walker
parent 94b7f8d82d
commit b4b70e8303
3 changed files with 12 additions and 0 deletions

View File

@ -13,6 +13,10 @@ ifdef SPDK_FTL_VSS_EMU
CFLAGS += -DSPDK_FTL_VSS_EMU
endif
ifdef SPDK_FTL_L2P_FLAT
CFLAGS += -DSPDK_FTL_L2P_FLAT
endif
ifneq ($(strip $(SPDK_FTL_ZONE_EMU_BLOCKS)),)
CFLAGS += -DSPDK_FTL_ZONE_EMU_BLOCKS=$(SPDK_FTL_ZONE_EMU_BLOCKS)
endif

View File

@ -6,11 +6,16 @@
#include "ftl_l2p.h"
#include "ftl_band.h"
#include "ftl_nv_cache.h"
#include "ftl_l2p_cache.h"
#include "ftl_l2p_flat.h"
/* TODO: Verify why function pointers had worse performance than compile time constants */
#ifdef SPDK_FTL_L2P_FLAT
#define FTL_L2P_OP(name) ftl_l2p_flat_ ## name
#else
#define FTL_L2P_OP(name) ftl_l2p_cache_ ## name
#endif
int

View File

@ -37,6 +37,9 @@ is_buffer_needed(enum ftl_layout_region_type type)
case FTL_LAYOUT_REGION_TYPE_DATA_BASE:
case FTL_LAYOUT_REGION_TYPE_NVC_MD_MIRROR:
case FTL_LAYOUT_REGION_TYPE_BAND_MD_MIRROR:
#ifndef SPDK_FTL_L2P_FLAT
case FTL_LAYOUT_REGION_TYPE_L2P:
#endif
return false;
default: