cxl_pci_get_latency(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cxl_pci_get_latency(9)

okay so bestie, welcome to the Kernel API Manual β€” this one's a lil function from the kernel called cxl_pci_get_latency, and honestly? it's giving "quiet math queen." she just crunches numbers about your PCIe link and hands you back a latency. no drama. πŸŽ€


✨ NAME ✨

cxl_pci_get_latency β€” calculate the link latency for the PCIe link

like literally, that's the whole job. she computes the link latency. that's it. that's her. πŸ¦‹


🌸 SYNOPSIS 🌸

long cxl_pci_get_latency (struct pci_dev *pdev );

🫢 ARGUMENTS 🫢

  • pdev β€” the PCI device. that's your girl. you hand her a PCI device and she does the math on it. πŸ’–

⭐ RETURN ⭐

she returns the calculated latency, or 0 for no latency. no latency, no problem, no cap. ✨


πŸ”₯ DESCRIPTION πŸ”₯

okay so this is all straight out of the CXL Memory Device SW Guide v1.0 2.11.4 β€” Β§Link latency calculation, main character energy. the formula is:

Link latency = LinkPropagationLatency + FlitLatency + RetimerLatency

now let's break it down, because some of these terms are lowkey doing nothing:

  • LinkProgationLatency is negligible, so 0 will be used. (yes β€” it's spelled that way in the source, i'm not fixing it, that's her name πŸ’€)
  • RetimerLatency is assumed to be negligible and 0 will be used. so both of those? zeros. gone. not invited to the party. πŸ™ˆ
  • FlitLatency = FlitSize / LinkBandwidth β€” this one's actually the moment. πŸ‘‘

and FlitSize is defined by spec β€” CXL rev3.0 4.2.1, iykyk:

  • a 68B flit is used up to 32GT/s
  • above 32GT/s, the 256B flit size is used

then the FlitLatency gets converted to picoseconds. tiny units for a tiny number. periodt. 🌈


πŸ‘‘ SEE ALSO πŸ‘‘

go read the whole friend group, they're all iconic. πŸ’œ


aaaand that's the page! this cutie lives in ./drivers/cxl/core, dated October 2026, and she's out here doing latency math on the PCIe link like the icon she is. mwah. πŸ’…πŸ’–πŸ§š

πŸ“¦ where this page comes from