Commit b4b70e83 authored by Kozlowski Mateusz's avatar Kozlowski Mateusz Committed by Ben Walker
Browse files

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: default avatarKozlowski Mateusz <mateusz.kozlowski@intel.com>
Signed-off-by: default avatarArtur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: Ib8906e10868455f88725b69b2b033b70a9f7256c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13358


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 94b7f8d8
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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
+5 −0
Original line number Diff line number Diff line
@@ -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
+3 −0
Original line number Diff line number Diff line
@@ -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: