Skip to content

Add FRED detection#172

Merged
klauspost merged 1 commit into
klauspost:masterfrom
riptl:fred
Mar 30, 2026
Merged

Add FRED detection#172
klauspost merged 1 commit into
klauspost:masterfrom
riptl:fred

Conversation

@riptl

@riptl riptl commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

FRED (Flexible Return and Event Delivery) is a technology enabling
faster syscall returns and interrupt handling

Although this is a kernel extension, I still think it's relevant for a Go userland.

FRED provides a measurable speedup for syscalls, so Go monitoring tooling could flag if a FRED-supporting CPU runs a kernel without fred=on boot parameter.

I'm doing work with handwritten kernels in KVM guests hosted by a Go hypervisor, so it's also useful for that niche use case.

Name: Intel(R) Core(TM) Ultra 7 355
Vendor String: GenuineIntel
Vendor ID: Intel
PhysicalCores: 8
Threads Per Core: 1
Logical Cores: 8
CPU Family 6 Model: 204 Stepping: 3
Features: ADX,AESNI,AVX,AVX2,AVXIFMA,AVXNECONVERT,AVXVNNI,AVXVNNIINT8,AVXVNNIINT16,BHI_CTRL,BMI1,BMI2,CETIBT,CETSS,CLMUL,CMOV,CMPCCXADD,CMPXCHG8,CX16,ERMS,F16C,FLUSH_L1D,FMA3,FRED,FSRM,FXSR,FXSROPT,GFNI,HRESET,HYBRID_CPU,IA32_ARCH_CAP,IA32_CORE_CAP,IBPB,IDPRED_CTRL,LAHF,LAM,LZCNT,MCDT_NO,MD_CLEAR,MMX,MOVBE,MOVDIR64B,MOVDIRI,NX,OSXSAVE,POPCNT,PSFD,RDRAND,RDSEED,RDTSCP,RRSBA_CTRL,SERIALIZE,SHA,SM3_X86,SM4_X86,SPEC_CTRL_SSBD,SSE,SSE2,SSE3,SSE4,SSE42,SSSE3,STIBP,STOSB_SHORT,SYSCALL,SYSEE,VAES,VMX,VPCLMULQDQ,WAITPKG,WBNOINVD,X87,XGETBV1,XSAVE,XSAVEC,XSAVEOPT,XSAVES,PMU_FIXEDCOUNTER_CYCLES,PMU_FIXEDCOUNTER_REFCYCLES,PMU_FIXEDCOUNTER_INSTRUCTIONS,PMU_FIXEDCOUNTER_TOPDOWN_SLOTS
Microarchitecture level: 3
Cacheline bytes: 64
L1 Instruction Cache: 65536 bytes
L1 Data Cache: 49152 bytes
L2 Cache: 3145728 bytes
L3 Cache: 12582912 bytes
Frequency: 3300000000 Hz
Boost Frequency: 4700000000 Hz
PMU version: 6 Fixed Counters: 3 General Purpose Counters: 8

Above is an Intel Panther Lake CPU with FRED support. It was quite hard to obtain due to Intel's incredibly low production volume. Happy to provide a CPUID dump if you want to add this to regression tests.

FRED (Flexible Return and Event Delivery) is a technology enabling
faster syscall returns and interrupt handling.
@klauspost klauspost merged commit 13f5f9c into klauspost:master Mar 30, 2026
10 checks passed
@riptl riptl deleted the fred branch March 30, 2026 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants