> On Fri, Oct 02, 2026 at 01:58 PM Ihor Solodrai <[email protected]> > wrote: >> Keep zstd-compressed blob in the kernel image and decompress and >> parse it synchronously on first use. > > imo this is the only one of the three worth considering.
This approach is clever; my prior thinking on this was since vmlinux is often compressed anyway we don't win anything from having a compressed .BTF section. But as you say if we compress the .BTF section within the kernel vmlinux, when the kernel image is then uncompressed into memory we will save most of the space taken up by vmlinux BTF due to its still-compressed size. The only overall cost is if when we wind up using vmlinux BTF with the compressed .BTF section, since we have to do a full vmlinux BTF allocation (on top of the spac taken up by the compressed .BTF section) right? So slight penalty if vmlinux is used, but big gain if not. If I'm understanding it correctly, seems like this is a nice win!
