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

How can i add a OS-SSD NVME command? #114

Open
chillsoul opened this issue Jun 20, 2023 · 3 comments
Open

How can i add a OS-SSD NVME command? #114

chillsoul opened this issue Jun 20, 2023 · 3 comments

Comments

@chillsoul
Copy link

chillsoul commented Jun 20, 2023

Sorry for this quite simple question, I'm a newbie for Linux Kernel Develop and SSD research, I see

Extensible OS-SSD NVMe commands

in your paper, but idk how to implement it.

Does it mean that I should change NVMe driver and FEMU? Can you please tell me where can I modify in FEMU?

Thank you very much.

By the way, your ASPLOS'23 CXL Paper is also very good.

@huaicheng
Copy link
Contributor

To extend the NVMe command set, if it's an admin cmd, check https://github.com/vtess/FEMU/blob/master/hw/femu/nvme-admin.c#L1029. Yes, you need to define your new NVMe command and implement the processing logics for both the software (e.g., NVMe driver) and FEMU.

@chillsoul
Copy link
Author

chillsoul commented Jul 26, 2023

I have some new question now.

When i run FEMU, there is two disk (qemu image's and BBSSD's), I want to know the LBA of a file in BBSSD to do something with BBSSD FTL.

If i use FIEMAP ioctl, it will print a filesystem logical address (FS LBA). And after that i found the FS LBA is not the LBA in BBSSD.I think it's because the two disk shared the filesystem logical address space (e.g. 0~100 for qemu image, 101~150 for BBSSD,if the file's FS LBA is 101,in fact the device LBA is 1).

Is there a easy way to get the true device LBA of a file? @huaicheng

Here is the detail: https://stackoverflow.com/questions/76762319/how-to-get-the-start-logical-address-of-a-block-device-partition.

@huaicheng
Copy link
Contributor

huaicheng commented Jul 27, 2023

If your file system is mounted on FEMU BBSSD, it owns the entire LBA space.

It seems filefrag is reporting offsets in blocks of 4096 bytes, by default, FEMU BBSSD is using 512 block sizes. You might need to do the conversion here by yourself.

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

2 participants