SimpleSSD / SimpleSSD-FullSystem

Open-Source Licensed Educational SSD Simulator for High-Performance Storage and Full-System Evaluations
BSD 3-Clause "New" or "Revised" License
88 stars 46 forks source link

Question : in which part of the code the I/O requests are send to the storage system? #18

Closed alinezhad2018 closed 3 years ago

alinezhad2018 commented 3 years ago

hi

Thank you for your support on this open-source full-system simulator, I am looking for a specific part of code (file) where I can access to the parameters related to the I/O requests (type:write or read, size of requests, ...). I want to check which requests are send to the storage System, for example NVMe Interface.

thanks

kukdh1 commented 3 years ago

Hi,

Please check src/dev/storage/simplessd/hil/nvme/namespace.cc. There are functions named flush, write, and read.

You can find debugprint function:

  debugprint(LOG_HIL_NVME,
             "NVM     | WRITE | SQ %u:%u | CID %u | NSID %-5d | %" PRIX64
             " + %d",
             req.sqID, req.sqUID, req.entry.dword0.commandID, nsid, slba, nlb);

As NVMe can have multiple namespaces, HIL object is stored in NVMe::Subsystem, not NVMe::Namespace. By invoking pParent->write(), NVMe can issue write request to underlying HIL. (pParent is pointer to NVMe::Subsystem)

Attach debugger should be better to understand the code execution flow.

Thanks.