nixos/spdk: Move to SPDK 26.09
SPDK 26.01 crashes while scanning the PCI bus with DPDK 26.07. Pick up the fork's bump to SPDK 26.09, which adds the 26.07 compatibility layer, and drop the 26.01-only DPDK 26.03 workaround. SPDK 26.09 sizes transport caches from the shared iobuf pool, so the RDMA transport on `cellar` starved the bdev and accel caches. Set its caches explicitly and enlarge the pools. Also retry `spdk-tgt` on failure, as loading its config can fail intermittently at startup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
65221ee403
commit
f7c733c2d1
3 files changed
+24
-13
No files matched your search
Generated
+3
-3
@@ -893,11 +893,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-mine": {
|
"nixpkgs-mine": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1795296436,
|
"lastModified": 1795358527,
|
||||||
"narHash": "sha256-HXC2lD2la2+b9uWP9keGtnK/XOy2WmxL7i2dvQ/YqTI=",
|
"narHash": "sha256-TTljUnAmsqpOpvEqzYqcMjU0GF/ZLkLc5F1AVrkwd/g=",
|
||||||
"owner": "devplayer0",
|
"owner": "devplayer0",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d49dd66c813e9c18778620a557e66a837936c3bd",
|
"rev": "320600d55ff67365e933b98b339acdeac238eb26",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -75,6 +75,18 @@ in
|
|||||||
];
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
# Sized with `scripts/calc-iobuf.py` for the 16-core mask: the bdev and accel caches
|
||||||
|
# plus the RDMA transport's, with headroom for in-flight I/O
|
||||||
|
iobuf = [
|
||||||
|
{
|
||||||
|
method = "iobuf_set_options";
|
||||||
|
params = {
|
||||||
|
small_pool_count = 16384;
|
||||||
|
large_pool_count = 2048;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
scheduler = [
|
scheduler = [
|
||||||
{
|
{
|
||||||
method = "framework_set_scheduler";
|
method = "framework_set_scheduler";
|
||||||
@@ -107,7 +119,12 @@ in
|
|||||||
nvmf = [
|
nvmf = [
|
||||||
{
|
{
|
||||||
method = "nvmf_create_transport";
|
method = "nvmf_create_transport";
|
||||||
params.trtype = "RDMA";
|
params = {
|
||||||
|
trtype = "RDMA";
|
||||||
|
# The default takes whatever the shared pool has left, starving the other caches
|
||||||
|
iobuf_small_cache_size = 32;
|
||||||
|
iobuf_large_cache_size = 32;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
(nvmfListener "nqn.2014-08.org.nvmexpress.discovery")
|
(nvmfListener "nqn.2014-08.org.nvmexpress.discovery")
|
||||||
] ++ (nvmfBdev {
|
] ++ (nvmfBdev {
|
||||||
|
|||||||
@@ -49,15 +49,6 @@ let
|
|||||||
spdk = pkgs.spdk.overrideAttrs (o: {
|
spdk = pkgs.spdk.overrideAttrs (o: {
|
||||||
configureFlags = o.configureFlags ++ (map (withFeature true) [ "rdma" "ublk" ]);
|
configureFlags = o.configureFlags ++ (map (withFeature true) [ "rdma" "ublk" ]);
|
||||||
buildInputs = o.buildInputs ++ (with pkgs; [ liburing ]);
|
buildInputs = o.buildInputs ++ (with pkgs; [ liburing ]);
|
||||||
# SPDK 26.01 recognizes prerelease DPDK 26.03, but selects the old PCI ABI for its release.
|
|
||||||
# TODO: Remove after upgrading to SPDK >= 26.05, which handles released DPDK 26.03:
|
|
||||||
# https://github.com/spdk/spdk/blob/v26.05/lib/env_dpdk/pci_dpdk.c
|
|
||||||
# nixos-unstable still packages 26.01 without this fix (checked 2026-11-15).
|
|
||||||
postPatch = (o.postPatch or "") + lib.optionalString (o.version == "26.01") ''
|
|
||||||
substituteInPlace lib/env_dpdk/pci_dpdk.c \
|
|
||||||
--replace-fail 'else if (year == 25) {' \
|
|
||||||
'else if (year == 25 || (year == 26 && month == 3 && minor == 0)) {'
|
|
||||||
'';
|
|
||||||
});
|
});
|
||||||
spdk-rpc = (pkgs.writeShellScriptBin "spdk-rpc" ''
|
spdk-rpc = (pkgs.writeShellScriptBin "spdk-rpc" ''
|
||||||
exec ${pkgs.python3}/bin/python3 ${spdk.src}/scripts/rpc.py "$@"
|
exec ${pkgs.python3}/bin/python3 ${spdk.src}/scripts/rpc.py "$@"
|
||||||
@@ -111,6 +102,9 @@ in
|
|||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStartPre = "${spdk.src}/scripts/setup.sh";
|
ExecStartPre = "${spdk.src}/scripts/setup.sh";
|
||||||
ExecStart = "${spdk}/bin/spdk_tgt ${cfg.extraArgs} -c ${configJSON}";
|
ExecStart = "${spdk}/bin/spdk_tgt ${cfg.extraArgs} -c ${configJSON}";
|
||||||
|
# Loading the config can fail intermittently at startup; an identical retry succeeds
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = "5s";
|
||||||
};
|
};
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
# Other boxes' root disks; restart by hand when they can do without them
|
# Other boxes' root disks; restart by hand when they can do without them
|
||||||
|
|||||||
Reference in new issue
Block a user