lib/ftl: Update GC band selection mechanism
Don't let the invalidity value continuously drop in degenerate scenarios - previously could have happened if band_cmp picked based on other value, when invalidity is similar. Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com> Signed-off-by: Mariusz Barczak <mariusz.barczak@intel.com> Change-Id: I33166501e832cd7f359b3acef1e614cf9b1288d5 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16215 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
This commit is contained in:
parent
723b1c5021
commit
9bd8b264ec
@ -610,9 +610,12 @@ ftl_band_search_next_to_reloc(struct spdk_ftl_dev *dev)
|
||||
if (phys_id == FTL_BAND_PHYS_ID_INVALID ||
|
||||
band_cmp(invalidity, wr_cnt, max_invalidity, max_wr_cnt,
|
||||
band->phys_id, phys_id)) {
|
||||
max_invalidity = invalidity;
|
||||
max_wr_cnt = wr_cnt;
|
||||
phys_id = band->phys_id;
|
||||
|
||||
if (invalidity > max_invalidity) {
|
||||
max_invalidity = invalidity;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user