Comments (11)
Hi @LiadOz, thanks for putting this on our radar. We will have to spend some time coming up with the optimal solution.
For now, I think you should be able to achieve the desired outcome by sending the Keep Alive command "manually" through xnvme_cmd_pass_admin()
. Can you try this out?
from xnvme.
This would technically work as a workaround. If keep_alive_timeout_ms
is set, spdk will send the keep alive command on it's own when spdk_nvme_ctrlr_process_admin_completions
is called. So with the solution you provided 2 keep alives will be sent, one by the user, and the other one by spdk. The target probably doesn't care that it will get multiple keep alives at the same time.
I will test this solution on my environment and see if it works.
from xnvme.
@karlowich This solution seems to work for my use case. In my fork I added spdk_keep_alive_timeout_ms
field to xnvme_opts
. Can I open a PR for this change?
from xnvme.
@LiadOz as you point out in your previous comment spdk_keep_alive_timeout_ms
is not needed when sending the keep alive manually. So I'm not sure I see why we would use spdk_keep_alive_timeout_ms
as long as we don't support manually calling spdk_nvme_ctrlr_process_admin_completions
.
But maybe I'm missing something?
from xnvme.
spdk_keep_alive_timeout_ms
is first passed to the target in the initialization phase. In addition when spdk_nvme_ctrlr_process_admin_completions
is called it checks if the keep alive timeout is activated and if a sufficient amount of time has passed then it sends the keep alive command. So it has two purposes.
from xnvme.
@LiadOz Yes, but as far as I can tell, if you don't plan on calling spdk_nvme_ctrlr_process_admin_completions
there is no need to set spdk_keep_alive_timeout_ms
.
from xnvme.
I'm saying that the parameter spdk_keep_alive_timeout_ms
does two things. First it sets the keep alive value for the target. So when the target got that value, it knows that if spdk_keep_alive_timeout_ms
passes without a keep alive then it will abort all of the other commands. This is the behavior that I need.
In addition, when this value is set in the spdk of the host side, when spdk_nvme_ctrlr_process_admin_completions
is called, then if a sufficient amount of time has passed it will send a keep alive command on its own.
So with the solution you suggested, since I can't call spdk_nvme_ctrlr_process_admin_completions
directly, I will send keep alive commands on my own. But I need to let the target know what is the acceptable keep alive timeout, that's why I need to set spdk_keep_alive_timeout_ms
.
This parameter affects multiple behaviors, that's why I still need it.
from xnvme.
@LiadOz Sorry, you are absolutely right. Now I see the value of being able to set spdk_keep_alive_timeout_ms
, you can go ahead and open a PR.
from xnvme.
@LiadOz Can I close this?
from xnvme.
My PR only added the option to enable the keep alive feature. The way we are sending the keep alive commands is workaround/hack, I don't think this ticket should be closed until a proper solution for it is implemented. But if you think the current workaround is good enough you can close this ticket. I have no problem with continuing to work with the hack.
from xnvme.
@LiadOz Good point, let's keep this open to remind us in the future.
from xnvme.
Related Issues (20)
- The order of tests matters
- Known Issue: show-regs through SPDK crashes qemu on MacOS HOT 1
- Inconsistent naming of IOCS/IDCSS/CSI HOT 1
- Requirements from Fedora packaging HOT 1
- Missing bit in spec Write Zeroes HOT 1
- Comparing the capabilities of `bdev_nvme.c` and `bdev_xnvme.c` with the NVMe specifications HOT 5
- BUG Sighting: missing compile flag `-lbsd` for DPDK on Ubuntu
- DPDK cannot be installed on FreeBSD 14 HOT 2
- xnvme identify controller erroneously sets nsid HOT 1
- FIO compiled with xNVMe doesn't work with the SPDK FIO plugin HOT 4
- Bump SPDK to v24.01 HOT 1
- CI: Drop MacOS 11 and add MacOS 14
- Run userspace tests on FreeBSD HOT 1
- Documentation overhaul
- Re-deploy verification runners
- Silent failure for enum test with SPDK HOT 1
- Localhost fabrics doesn't work on FreeBSD
- Packaging: conda
- meson: change ``with-spdk`` from boolean to feature with default value ``auto`` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xnvme.