鄭又維
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # SSD note ## FTL ### Mapping 要maintain: L2P table valid count table(bitmap) page mapping block mapping hybrid mapping 4k mapping (alignment) for example: 256GB/4KB=64M entries table size = 64M*4B = 256MB ~ 1/1000 of ssd size L2P table大部分都在DRAM上 mapping table要寫進nand flash(至少掉電前) 寫入時機: - mapping > threshold - data size > threshold - 寫完的block > threshold 我的觀察: RAM上面只計一部分的table(常用?),如果RAM沒有會進去nand找 (這顆SSD不帶DRAM?) 二級mapping table 如果要從nand找mapping 1 page = 16KB = 16KB/4B = 4K entries 以256GB(64M entries)為例。至少要有3層的mapping L2P table(LCA <-> PCA) Page中的4k data對應一個 PCA zip可以讓一個page放>4個PCA 希望program能 - multiplane - parallel channel - bank interleave - DIE interleave PCA:VB addr + VB offset ### GC 挑garbage最多的block做GC 3 step: 1. 選source block 2. 從source block中找valid data(要valid count, valid bitmap) 3. 將valid data寫入target block valid count table 每次寫都會更新 valid count = 0 的 block 可以erase 如果讀DRAM-less還要swap table 如果沒有bitmap,可以用meta data用data去找(GC慢) alternative: P2L table GC時機: foreground:寫滿才做 / background 挑source: 有效數據少/擦寫次數小 查到的: 實際GC是以VB為單位 VB定義:一組跨channel、CE、plane的相同編號block組成 目標:最佳化program讓每個sub-block可以concurrent 分類: 1. 支援DIE interleave - VB:block addr - 同一個VB block addr一樣 2. 不可DIE interleave - VB:block addr + die addr - 同一個VB block addr, DIE addr一樣 3. 不可DIE interleave + target需求 - VB:block addr + die addr + target addr - 同一個VB block addr, DIE addr, target addr一樣 ### WA 數據壓縮可以讓WA < 1 OP越大WA越小 OP = (N-U)/U 平均有效數據為N/(N+U) 為了寫(1-N/(N+U)),要寫1 WA = 1/(1-N/(N+U)) 影響WA的因素: OP user pattern - 順寫GC小 GC 策略 wear leveling read disturb/data retention handling trim (格式化table會清掉嗎?) ### TRIM file system 刪除只清除file<->LBA 的連結 SSD中mapping table不變 Trim告訴SSD data invalid (UNMAP, Dataset Management) 1. 清除L2P table(指向空地址) 2. 清除valid page bitmap 對應的bit 3. 清除valid page count *TRIM不會觸發GC* 後續GC處理: 4. 重新計算GC priority(by VPC) 5. 回收block 6. erase block ### WL Data分 Data: Hot/Cold block: Old/Young Dynamic WL: hot data寫到young block Static WL: 類似GC(但變成挑cold data在的block) 如果GC時有cold data在block中->WA 可以分成 Static WL 將 cold data 一起放 Dynamic WL 將 GC + host 一起放 Q: SSD怎麼分cold/hot data? ### 掉電恢復 掉電前步驟 1. buffer中cache的user data寫入nand 2. mapping table寫入nand 3. bad block ubfo寫入nand 4. others Solution 用電容暫時供電 把Volatile(RAM)換成non-volatile介質 回覆: 用metadata紀錄PA/LBA/userdata/timestamp (慢) 用上個snapshot加上部分metadata重建 ### Bad block management bad block依照來源分成:Factory/Grown 出廠就壞的的話會在first/last page還有spare第一個byte寫0xFF 先掃描nand,建立bad block table->存在OTP bad block處理機制: 1. 略過:直接寫下一個die 2. 替換:die2-B寫到預留空間die2-B'上 remap table存bad block到替換的block 保證平行但整個ssd可用block數量會受限於壞的那個die ### SLC cache 好處: 1. SLC比TLC, QLC快 2. 防止lower page數據壞 3. 減少TLC沒寫滿的ECC error 4. 更耐寫 分成強制/非強制 SLC program 非強制可以有更好的後期效能,因為SLC用完就要直接寫TLC,強制寫入要再做搬移 SLC block 1. 靜態:某些block固定SLC 2. 動態 3. 混合 ### Device-based FTL 缺點: - FTL架構通要,不能針對應用定製 - 設計難度高 - 要隨nand出新的 - chip的性能跟容量有限制

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully