Skip to content

Commit

Permalink
Revert bbssd line->vpc updating logic (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
huaicheng committed Oct 18, 2021
1 parent 0ab8c45 commit 9638585
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hw/block/femu/bbssd/ftl.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,9 +557,11 @@ static void mark_page_invalid(struct ssd *ssd, struct ppa *ppa)
ftl_assert(line->vpc > 0 && line->vpc <= spp->pgs_per_line);
/* Adjust the position of the victime line in the pq under over-writes */
if (line->pos) {
/* Note that line->vpc will be updated by this call */
pqueue_change_priority(lm->victim_line_pq, line->vpc - 1, line);
} else {
line->vpc--;
}
line->vpc--;

if (was_full_line) {
/* move line: "full" -> "victim" */
Expand Down

0 comments on commit 9638585

Please sign in to comment.