numam-spdk/test/unit/lib/ftl
Konrad Sztyber 0f0af48009 lib/ftl: keep reloc traffic out of non-volatile cache
Moving data from one band to the other doesn't need to be stored on the
non-volatile cache. Not only does it add unnecessary traffic to the
cache (wearing it out and reducing its throughput), but it requires us
to synchronize it with user writes to the same LBAs.

To avoid all that, this patch adds the FTL_IO_BYPASS_CACHE flag to all
writes coming from the reloc module. However, to be sure that the moved
data is stored on disk and can be restored in case of power loss, we
need to make sure that each free band have all of its data moved to a
closed band before it can be erased. It's done by keeping track of the
number of outstanding IOs moving data from particular band
(num_reloc_blocks), as well as the number of open bands that contains
data from this band (num_reloc_bands). Only when both of these are at
zero and the band has zero valid blocks it can be erased.

Change-Id: I7c106011ffc9685eb8e5ff497919237a305e4478
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458101
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-07-12 12:39:38 +00:00
..
common lib/ftl: keep reloc traffic out of non-volatile cache 2019-07-12 12:39:38 +00:00
ftl_band.c lib/ftl: Remove ftl_md struct from band 2019-06-07 04:39:14 +00:00
ftl_io.c lib/ftl: Add ftl_io argument to internal I/O callbacks 2019-06-07 18:26:57 +00:00
ftl_md lib/ftl: Mark all lba map segments as cached for open bands 2019-07-01 03:29:00 +00:00
ftl_ppa lib/ftl: Fix ppa pack function 2019-06-26 08:38:32 +00:00
ftl_reloc.c lib/ftl: Drop relocation for empty bands immediately 2019-07-01 03:29:00 +00:00
ftl_rwb.c lib/ftl: consider 3D TLC NAND read unit size 2019-05-24 23:29:22 +00:00
ftl_wptr lib/ftl: Track cached lba map segments 2019-06-11 06:21:46 +00:00
Makefile lib/ftl: allow parent/child relations between IOs 2019-04-24 21:57:06 +00:00