f2fs: change GC bitmaps to apply the section granularity
This patch removes a bitmap for victim segments selected by foreground GC, and modifies the other bitmap for victim segments selected by background GC. 1) foreground GC bitmap : We don't need to manage this, since we just only one previous victim section number instead of the whole victim history. The f2fs uses the victim section number in order not to allocate currently GC'ed section to current active logs. 2) background GC bitmap : This bitmap is used to avoid selecting victims repeatedly by background GCs. In addition, the victims are able to be selected by foreground GCs, since there is no need to read victim blocks during foreground GCs. By the fact that the foreground GC reclaims segments in a section unit, it'd be better to manage this bitmap based on the section granularity. Reviewed-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
This commit is contained in:
parent
33afa7fde0
commit
5ec4e49f9b
7 changed files with 68 additions and 59 deletions
|
@ -153,7 +153,7 @@ static void update_mem_info(struct f2fs_sb_info *sbi)
|
|||
/* build dirty segmap */
|
||||
si->base_mem += sizeof(struct dirty_seglist_info);
|
||||
si->base_mem += NR_DIRTY_TYPE * f2fs_bitmap_size(TOTAL_SEGS(sbi));
|
||||
si->base_mem += 2 * f2fs_bitmap_size(TOTAL_SEGS(sbi));
|
||||
si->base_mem += f2fs_bitmap_size(TOTAL_SECS(sbi));
|
||||
|
||||
/* buld nm */
|
||||
si->base_mem += sizeof(struct f2fs_nm_info);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue