Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why are the delay models different between bbssd and zns in FEMU? #171

Open
wnsah814 opened this issue Mar 2, 2025 · 0 comments
Open

Why are the delay models different between bbssd and zns in FEMU? #171

wnsah814 opened this issue Mar 2, 2025 · 0 comments

Comments

@wnsah814
Copy link
Contributor

wnsah814 commented Mar 2, 2025

Hello FEMU developers,

While examining the FEMU codebase, I noticed that the delay modeling approaches for bbssd and zns are quite different. I'm curious about the reasoning behind these differences.

Why does bbssd track delays at the LUN level while zns uses plane-level granularity?

bbssd delay model:

uint64_t ssd_advance_status(struct ssd *ssd, struct ppa *ppa, struct nand_cmd *ncmd)
{
    // ...
    struct nand_lun *lun = get_lun(ssd, ppa);
    // ...
    switch (c) {
    case NAND_READ:
        nand_stime = (lun->next_lun_avail_time < cmd_stime) ? cmd_stime : \
                     lun->next_lun_avail_time;
        lun->next_lun_avail_time = nand_stime + spp->pg_rd_lat;
        lat = lun->next_lun_avail_time - cmd_stime;
        break;
    // ...
}

zns delay model:

uint64_t zns_advance_status(struct zns_ssd *zns, struct ppa *ppa, struct nand_cmd *ncmd)
{
    // ...
    struct zns_plane *pl = get_plane(zns, ppa);
    int nand_type = get_blk(zns,ppa)->nand_type;
    
    uint64_t read_delay = zns->timing.pg_rd_lat[nand_type];
    // ...
    switch (c) {
    case NAND_READ:
        nand_stime = (pl->next_plane_avail_time < req_stime) ? req_stime : \
                     pl->next_plane_avail_time;
        pl->next_plane_avail_time = nand_stime + read_delay;
        lat = pl->next_plane_avail_time - req_stime;
        break;
    // ...
}

I'm simply trying to understand the design rationale behind these differences.
Thank you for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant