You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nand_cell_type (1 SLC .. 4 QLC) plus cell_pages selects a cell type for the device, and the media layer then applies per-page-type read/program latencies for that type:
What is not modelled is a hybrid part — an SLC write cache in front of TLC, with data folded from one to the other. nand_cell_type is device-wide, so you cannot presently mark some blocks SLC and the rest TLC, and there is no fold/migration path between them.
If you want the timing shape of an SLC cache today, the closest thing is the bbssd write buffer (buffer_size, in pages), which absorbs writes at DRAM latency and programs them later — it models the deferral, not the SLC media.
Hi,an SLC+TLC hybrid solution has been realized utilizing the FEMU platform. Researchers wishing to conduct performance investigations are invited to access the repository at: https://github.com/Funny-Boy-Max/Hybrid_FEMU". Relevant literature is available here: “Hook: A pattern locality guided prefetch with enhanced read performance for hybrid SSDs”
@Funny-Boy-Max
Thx! I will carefully learn your code and read your paper. I would be glad to have further communication and explore possible collaboration in the future.
@Funny-Boy-Max Thx! I will carefully learn your code and read your paper. I would be glad to have further communication and explore possible collaboration in the future.
For inquiries, please feel free to contact us via email at mailto: zhaoyumiao99@gmail.com.
nand_cell_type (1 SLC .. 4 QLC) plus cell_pages selects a cell type for the device, and the media layer then applies per-page-type read/program latencies for that type:
What is not modelled is a hybrid part — an SLC write cache in front of TLC, with data folded from one to the other. nand_cell_type is device-wide, so you cannot presently mark some blocks SLC and the rest TLC, and there is no fold/migration path between them.
If you want the timing shape of an SLC cache today, the closest thing is the bbssd write buffer (buffer_size, in pages), which absorbs writes at DRAM latency and programs them later — it models the deferral, not the SLC media.
@Funny-Boy-Max thanks for sharing Hybrid_FEMU and the Hook paper — that is the most direct starting point for anyone wanting this today.
@maxDeveloper42 on where to put it, the short answer is: one line decides the timing, and the rest is allocation policy.
Timing.bb_decode_loc() in hw/femu/bbssd/ftl-media.c is the single place a cell type becomes a latency — it fills NandLoc.flash_type from the device-wide n->nand_cell_type. The media layer below it (hw/femu/nand/nand-media.c) already indexes everything by that field (rd_table_ns[flash_type][page_type], wr_table_ns, er_table_ns, from hw/femu/nand/nand.c). So if you store a cell type per block in struct nand_block (hw/femu/bbssd/ftl.h) and read it there instead of the device property, per-block SLC/TLC timing works with no changes to the timing model itself.
Allocation and folding. There is already a multi-write-pointer mechanism: ssd_write_pointer_for_class() / get_new_page_class() in hw/femu/bbssd/ftl-line-gc.c, used today for log and hot/cold. Add an SLC class and a TLC class, point host writes at SLC, and fold with the existing collection path — reclaim_line() already relocates valid pages through a write pointer, so an SLC→TLC fold is a collection whose destination is the TLC class. should_gc_high() is the shape to copy for the "SLC is filling up" trigger.
The one real trap is capacity, not timing. An SLC block holds a third of a TLC block's data, but FEMU's geometry is uniform — pgs_per_blk is global and capacity is derived from it in hw/femu/bbssd/ftl-geom.c. Modelling the true capacity asymmetry means making usable pages per block vary, which touches the geometry and capacity accounting. If you only care about the latency behaviour, keep the page counts uniform and vary just the timing; that is far less invasive and is usually enough.
Worth saying plainly: this is a design change rather than a missing knob, so it belongs as a feature PR rather than something nand_cell_type can be stretched to cover.
@Funny-Boy-Max thank you again for Hybrid_FEMU and the Hook paper. We would like to bring a hybrid SLC/TLC mode into FEMU, with credit to your work. Which option do you prefer?
You open a pull request against current master, and we help with the port.
We port your code ourselves and keep you as the commit author, so GitHub lists you as a FEMU contributor.
Master changed a lot since early 2025: a shared NAND media layer now sets per-page latencies. So the code needs a port in either case.
Hybrid_FEMU has no license file. Could you confirm that we may use your code under FEMU's GPL-2.0 license? Also, which of the four Hybrid_SSD variants should we use as the base?
@Funny-Boy-Max thank you again for Hybrid_FEMU and the Hook paper. We would like to bring a hybrid SLC/TLC mode into FEMU, with credit to your work. Which option do you prefer?
You open a pull request against current master, and we help with the port.
We port your code ourselves and keep you as the commit author, so GitHub lists you as a FEMU contributor.
Master changed a lot since early 2025: a shared NAND media layer now sets per-page latencies. So the code needs a port in either case.
Hybrid_FEMU has no license file. Could you confirm that we may use your code under FEMU's GPL-2.0 license? Also, which of the four Hybrid_SSD variants should we use as the base?
Thanks for your reply. I am inclined to go with the second option: you handle the porting and retain me as the original commit author. Please mark me in the commits using Author: or Co-authored-by:, and note in the PR/README that the code originates from Hybrid_FEMU. I accept this arrangement, and I appreciate your including the contribution in FEMU.
Regarding licensing, if it is confirmed that the relevant code in Hybrid_FEMU was written independently by me and does not include third-party code under an incompatible license, I agree to license it under GPL-2.0 or GPL-2.0-or-later, which is compatible with FEMU. I will add a LICENSE file and provenance/attribution notes to Hybrid_FEMU to avoid any ambiguity later.
As for which variant to use as the basis, my suggestion is:
Code integration baseline: Hybrid_SSD1. It is the minimal baseline and contains only the basic mixed SLC/TLC FTL, physical structure, latency, and management framework. It is the cleanest starting point for merging into the FEMU main branch, with the lowest review and adaptation cost.
Final functional target: Hybrid_SSD5. It contains both the HRCMRS caching policy and the PLGDP prefetching mechanism, and is the complete version.
If you prefer staged porting, you can first merge Hybrid_SSD1, then add the HRCMRS from Hybrid_SSD3, then add the PLGDP from Hybrid_SSD4, and the final result would be equivalent to Hybrid_SSD5.
If you prefer to port the full solution at once, then use Hybrid_SSD5 as the basis, but the PR will be larger, and the adaptation and review costs will be higher.
So my explicit recommendation is: use Hybrid_SSD1 as the upstream integration baseline, and Hybrid_SSD5 as the functional reference and final target. I do not recommend using Hybrid_SSD3 or Hybrid_SSD4 alone as the basis, because each contains only half of the functionality.
In addition, because the current FEMU shared NAND media layer now determines per-page latency, during porting the latency settings in the original hb.c need to be migrated to the new media-layer model. The FTL layer should mainly handle mapping, cache migration, and prefetching logic.
If further clarification is required regarding the project file structure, please consult “Hybrid_FEMU/代码说明.docx” (Code Documentation).
@Funny-Boy-Max thanks a lot for the detailed reply and your thesis, they really helped!
A first version of the hybrid mode is now on master (2815321). It adds an optional pSLC pool in front of MLC, TLC or QLC flash, and it's off by default:
13. @Funny-Boy-Max thanks a lot for the detailed reply and your thesis, they really helped!
A first version of the hybrid mode is now on master (2815321). It adds an optional pSLC pool in front of MLC, TLC or QLC flash, and it's off by default: -device femu,femu_mode=1,nand_cell_type=3,tier_mode=static,tier_static_mb=1024
Docs are in `hw/femu/docs/features/tiered-nand.md`. The commit and docs credit your work as the design source.
Your HRCMRS and PLGDP policies aren't in yet. We'd love to port them on top of this later, with you as the author.
Thanks again!
Thank you, Professor Huaicheng, for the recent advancement of this work and the earlier guidance. I look forward to more opportunities for collaboration in the future!
Activity
huaicheng commentedon Jun 20, 2023
Yes, FEMU can be extended to do so but its current FTL doesn't have corresponding logics.
What you need to do is to implement your data placement policies on SLC and TLC.
huaicheng commentedon Aug 30, 2026
Partly, with a caveat worth being clear about.
nand_cell_type(1 SLC .. 4 QLC) pluscell_pagesselects a cell type for the device, and the media layer then applies per-page-type read/program latencies for that type:What is not modelled is a hybrid part — an SLC write cache in front of TLC, with data folded from one to the other.
nand_cell_typeis device-wide, so you cannot presently mark some blocks SLC and the rest TLC, and there is no fold/migration path between them.If you want the timing shape of an SLC cache today, the closest thing is the bbssd write buffer (
buffer_size, in pages), which absorbs writes at DRAM latency and programs them later — it models the deferral, not the SLC media.Leaving this open as a real feature gap.
maxDeveloper42 commentedon Sep 2, 2026
Hi @huaicheng , thanks for the detailed explanation – really appreciate it.
I'm actually want to try to implement this hybrid SLC+TLC thing mostly for my own curiosity and learning, not for any formal project.
Since I'm pretty new to FEMU, I was wondering which layer you think would be the best place to achieve this feature?
Looking forward to your thoughts when you have a moment.
Funny-Boy-Max commentedon Sep 2, 2026
Hi,an SLC+TLC hybrid solution has been realized utilizing the FEMU platform. Researchers wishing to conduct performance investigations are invited to access the repository at: https://github.com/Funny-Boy-Max/Hybrid_FEMU". Relevant literature is available here: “Hook: A pattern locality guided prefetch with enhanced read performance for hybrid SSDs”
maxDeveloper42 commentedon Sep 2, 2026
@Funny-Boy-Max
Thx! I will carefully learn your code and read your paper. I would be glad to have further communication and explore possible collaboration in the future.
Funny-Boy-Max commentedon Sep 2, 2026
For inquiries, please feel free to contact us via email at mailto: zhaoyumiao99@gmail.com.
Funny-Boy-Max commentedon Sep 2, 2026
Thank you for your further response!
huaicheng commentedon Sep 2, 2026
@Funny-Boy-Max thanks for sharing Hybrid_FEMU and the Hook paper — that is the most direct starting point for anyone wanting this today.
@maxDeveloper42 on where to put it, the short answer is: one line decides the timing, and the rest is allocation policy.
Timing.
bb_decode_loc()inhw/femu/bbssd/ftl-media.cis the single place a cell type becomes a latency — it fillsNandLoc.flash_typefrom the device-widen->nand_cell_type. The media layer below it (hw/femu/nand/nand-media.c) already indexes everything by that field (rd_table_ns[flash_type][page_type],wr_table_ns,er_table_ns, fromhw/femu/nand/nand.c). So if you store a cell type per block instruct nand_block(hw/femu/bbssd/ftl.h) and read it there instead of the device property, per-block SLC/TLC timing works with no changes to the timing model itself.Allocation and folding. There is already a multi-write-pointer mechanism:
ssd_write_pointer_for_class()/get_new_page_class()inhw/femu/bbssd/ftl-line-gc.c, used today for log and hot/cold. Add an SLC class and a TLC class, point host writes at SLC, and fold with the existing collection path —reclaim_line()already relocates valid pages through a write pointer, so an SLC→TLC fold is a collection whose destination is the TLC class.should_gc_high()is the shape to copy for the "SLC is filling up" trigger.The one real trap is capacity, not timing. An SLC block holds a third of a TLC block's data, but FEMU's geometry is uniform —
pgs_per_blkis global and capacity is derived from it inhw/femu/bbssd/ftl-geom.c. Modelling the true capacity asymmetry means making usable pages per block vary, which touches the geometry and capacity accounting. If you only care about the latency behaviour, keep the page counts uniform and vary just the timing; that is far less invasive and is usually enough.Worth saying plainly: this is a design change rather than a missing knob, so it belongs as a feature PR rather than something
nand_cell_typecan be stretched to cover.huaicheng commentedon Oct 10, 2026
@Funny-Boy-Max thank you again for Hybrid_FEMU and the Hook paper. We would like to bring a hybrid SLC/TLC mode into FEMU, with credit to your work. Which option do you prefer?
Master changed a lot since early 2025: a shared NAND media layer now sets per-page latencies. So the code needs a port in either case.
Hybrid_FEMU has no license file. Could you confirm that we may use your code under FEMU's GPL-2.0 license? Also, which of the four Hybrid_SSD variants should we use as the base?
Funny-Boy-Max commentedon Oct 14, 2026
Thanks for your reply. I am inclined to go with the second option: you handle the porting and retain me as the original commit author. Please mark me in the commits using Author: or Co-authored-by:, and note in the PR/README that the code originates from Hybrid_FEMU. I accept this arrangement, and I appreciate your including the contribution in FEMU.
Regarding licensing, if it is confirmed that the relevant code in Hybrid_FEMU was written independently by me and does not include third-party code under an incompatible license, I agree to license it under GPL-2.0 or GPL-2.0-or-later, which is compatible with FEMU. I will add a LICENSE file and provenance/attribution notes to Hybrid_FEMU to avoid any ambiguity later.
As for which variant to use as the basis, my suggestion is:
Code integration baseline: Hybrid_SSD1. It is the minimal baseline and contains only the basic mixed SLC/TLC FTL, physical structure, latency, and management framework. It is the cleanest starting point for merging into the FEMU main branch, with the lowest review and adaptation cost.
Final functional target: Hybrid_SSD5. It contains both the HRCMRS caching policy and the PLGDP prefetching mechanism, and is the complete version.
If you prefer staged porting, you can first merge Hybrid_SSD1, then add the HRCMRS from Hybrid_SSD3, then add the PLGDP from Hybrid_SSD4, and the final result would be equivalent to Hybrid_SSD5.
If you prefer to port the full solution at once, then use Hybrid_SSD5 as the basis, but the PR will be larger, and the adaptation and review costs will be higher.
So my explicit recommendation is: use Hybrid_SSD1 as the upstream integration baseline, and Hybrid_SSD5 as the functional reference and final target. I do not recommend using Hybrid_SSD3 or Hybrid_SSD4 alone as the basis, because each contains only half of the functionality.
In addition, because the current FEMU shared NAND media layer now determines per-page latency, during porting the latency settings in the original hb.c need to be migrated to the new media-layer model. The FTL layer should mainly handle mapping, cache migration, and prefetching logic.
If further clarification is required regarding the project file structure, please consult “Hybrid_FEMU/代码说明.docx” (Code Documentation).
Thanks!
femu/bbssd: add a pSLC tier in front of dense NAND
huaicheng commentedon Nov 3, 2026
@Funny-Boy-Max thanks a lot for the detailed reply and your thesis, they really helped!
A first version of the hybrid mode is now on master (2815321). It adds an optional pSLC pool in front of MLC, TLC or QLC flash, and it's off by default:
Docs are in
hw/femu/docs/features/tiered-nand.md. The commit and docs credit your work as the design source.Your HRCMRS and PLGDP policies aren't in yet. We'd love to port them on top of this later, with you as the author.
Thanks again!
Funny-Boy-Max commentedon Nov 3, 2026
Thank you, Professor Huaicheng, for the recent advancement of this work and the earlier guidance. I look forward to more opportunities for collaboration in the future!