Commit 02bf51b
fix(nbd): change NBD status poll sleep from 100ns to 100µs to avoid useless busy spinning (#2884)
fix(nbd): adjust status poll sleep from 100ns to 100µs
Optimize NBD connected check polling interval:
- Original 100ns causes useless busy spin since nbdnl.Connect() is sync
netlink call;
- New 100µs yields CPU safely without any functional regression;
- Open/Close path have ctx & 30s timeout guard, rootfs start runs in
separate goroutine, no side effect for sandbox rootfs lifecycle.
/cc @jakubno @dobrac @ValentaTomas Would appreciate your review on this
change, thanks!
Co-authored-by: AdaAibaby <shaolila@buaa.edu.cn>
Co-authored-by: Jakub Novák <jakub@e2b.dev>1 parent 36055e1 commit 02bf51b
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
| 235 | + | |
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | | - | |
| 328 | + | |
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
| |||
0 commit comments