fn share_cache_with(cpu: i32)Expand description
Keep this thread to the CPUs it may run on that share cpu’s last-level cache.
A thread started per frame is placed on the least loaded CPU, on a host of several caches often under another one: its read of a frame leaves the frame’s lines there, and the X server’s next grab into that surface waits on every one of them (a 1280x720 grab took 2.0 ms against 0.9 on a four-node EPYC, the frame published that much later), while the read evicts whatever else runs there. Beside the encode, which has just read the same frame, it costs neither. A CPU whose caches the kernel does not list, or a cache of no CPU this thread may use, leaves it where it is.