cxl_pci_get_latency(9)
π 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
0will 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
0will 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 π
- Kernel file
./drivers/cxl/core/pci.c cxl core pci(9)devm_cxl_add_dport_by_dev(9)cxl_hdm_decode_init(9)read_cdat_data(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms