|
| static void * | ftl_thread (void *arg) |
| | ftl线程函数,不断从to_ftl中取req,处理(计算出时延)后放入to_poller 更多...
|
| |
| static bool | should_gc (struct ssd *ssd) |
| | 空闲gc阈值 更多...
|
| |
| static bool | should_gc_high (struct ssd *ssd) |
| | gc阈值 更多...
|
| |
| static struct ppa | get_maptbl_ent (struct ssd *ssd, uint64_t lpn) |
| |
| static void | set_maptbl_ent (struct ssd *ssd, uint64_t lpn, struct ppa *ppa) |
| | 赋值一个page映射表项 更多...
|
| |
| static uint64_t | ppa2pgidx (struct ssd *ssd, struct ppa *ppa) |
| |
| static uint64_t | get_rmap_ent (struct ssd *ssd, struct ppa *ppa) |
| |
| static void | set_rmap_ent (struct ssd *ssd, uint64_t lpn, struct ppa *ppa) |
| | 赋值一个反向映射表项(rmap[page_no(ppa)] -> lpn) 更多...
|
| |
| static int | victim_line_cmp_pri (pqueue_pri_t next, pqueue_pri_t curr) |
| |
| static pqueue_pri_t | victim_line_get_pri (void *a) |
| |
| static void | victim_line_set_pri (void *a, pqueue_pri_t pri) |
| |
| static size_t | victim_line_get_pos (void *a) |
| |
| static void | victim_line_set_pos (void *a, size_t pos) |
| |
| static void | ssd_init_lines (struct ssd *ssd) |
| | 初始化lines,所有line加入free_line_list,而full_line_list和victim_line_pq为空 更多...
|
| |
| static void | ssd_init_write_pointer (struct ssd *ssd) |
| | 写指针初始化,指向0 更多...
|
| |
| static void | check_addr (int a, int max) |
| |
| static struct line * | get_next_free_line (struct ssd *ssd) |
| |
| static void | ssd_advance_write_pointer (struct ssd *ssd) |
| | 写指针后移,每次写操作结束后调用 更多...
|
| |
| static struct ppa | get_new_page (struct ssd *ssd) |
| | 获取新的page(wpp已经更新,取其指向的page地址即可) 更多...
|
| |
| static void | check_params (struct ssdparams *spp) |
| |
| static void | ssd_init_params (struct ssdparams *spp) |
| | 设置nand大小/并行参数,做相关计算 更多...
|
| |
| static void | ssd_init_nand_page (struct nand_page *pg, struct ssdparams *spp) |
| |
| static void | ssd_init_nand_blk (struct nand_block *blk, struct ssdparams *spp) |
| |
| static void | ssd_init_nand_plane (struct nand_plane *pl, struct ssdparams *spp) |
| |
| static void | ssd_init_nand_lun (struct nand_lun *lun, struct ssdparams *spp) |
| |
| static void | ssd_init_ch (struct ssd_channel *ch, struct ssdparams *spp) |
| |
| static void | ssd_init_maptbl (struct ssd *ssd) |
| |
| static void | ssd_init_rmap (struct ssd *ssd) |
| |
| void | ssd_init (FemuCtrl *n) |
| | 初始化ssd参数,为ssd各层结构体分配空间,创建ftl线程 更多...
|
| |
| static bool | valid_ppa (struct ssd *ssd, struct ppa *ppa) |
| | 判断ppa地址是否越界 更多...
|
| |
| static bool | valid_lpn (struct ssd *ssd, uint64_t lpn) |
| |
| static bool | mapped_ppa (struct ppa *ppa) |
| |
| static struct ssd_channel * | get_ch (struct ssd *ssd, struct ppa *ppa) |
| |
| static struct nand_lun * | get_lun (struct ssd *ssd, struct ppa *ppa) |
| |
| static struct nand_plane * | get_pl (struct ssd *ssd, struct ppa *ppa) |
| |
| static struct nand_block * | get_blk (struct ssd *ssd, struct ppa *ppa) |
| |
| static struct line * | get_line (struct ssd *ssd, struct ppa *ppa) |
| |
| static struct nand_page * | get_pg (struct ssd *ssd, struct ppa *ppa) |
| |
| static uint64_t | ssd_advance_status (struct ssd *ssd, struct ppa *ppa, struct nand_cmd *ncmd) |
| | 根据操作类型,给出模拟的时延 更多...
|
| |
| static void | mark_page_invalid (struct ssd *ssd, struct ppa *ppa) |
| | update SSD status about one page from PG_VALID -> PG_INVALID 更多...
|
| |
| static void | mark_page_valid (struct ssd *ssd, struct ppa *ppa) |
| | 将一个page从PG_FREE标记为PG_VALID 更多...
|
| |
| static void | mark_block_free (struct ssd *ssd, struct ppa *ppa) |
| | 将一个空block中所有页标记为PG_FREE 更多...
|
| |
| static void | gc_read_page (struct ssd *ssd, struct ppa *ppa) |
| | gc产生的读page 更多...
|
| |
| **param ssd *param old_ppa *return uint64_t *static uint64_t | gc_write_page (struct ssd *ssd, struct ppa *old_ppa) |
| | gc产生的写 更多...
|
| |
| static struct line * | select_victim_line (struct ssd *ssd, bool force) |
| | 为gc选择一个victim line,优先队列中出队即可 更多...
|
| |
| static void | clean_one_block (struct ssd *ssd, struct ppa *ppa) |
| | gc清理一个block,将有效页转移 更多...
|
| |
| static void | mark_line_free (struct ssd *ssd, struct ppa *ppa) |
| | 将该line加入空闲line队列 更多...
|
| |
| static int | do_gc (struct ssd *ssd, bool force) |
| | gc函数,清理一整个line 更多...
|
| |
| static uint64_t | ssd_read (struct ssd *ssd, NvmeRequest *req) |
| |
| static uint64_t | ssd_write (struct ssd *ssd, NvmeRequest *req) |
| | ssd写延迟模拟 更多...
|
| |