On 10/02/2021 23:49, Christopher Degawa wrote:
Based on my limited understanding of the code, it's limiting the usage
using pthread_setaffinity_np and CPU_SET on Linux to limit the process to
certain CPUs, but it also has a default and max of the return of
`sysconf(_SC_NPROCESSORS_ONLN)`. According to Hassene Tmar of SVT-AV1, it
is a "target core count that SVT would do a best effort to achieve" and
"--lp 8 might still produce 50 threads". It does not actually limit how
many threads are deployed.

IMO people who want to do things with processor affinity should use the 
flexible tools that their OS provides to do it (on Linux, that's taskset for 
the ffmpeg utility and sched_setaffinity() for library users).  Having a 
specific and weird special case option is not obviously useful.

(In particular, not warning that it's changing processor affinity in a tricky 
way is making the option a footgun - if I run two instances of ffmpeg then the 
intuitive thing to do would be to pass my number of cpus / 2 to each, which 
would give me a result much worse than passing nothing at all.)

That said, if you have a general use-case where this is helpful and the 
documentation explains what it is doing (and warns about the bad cases) then 
maybe?

Thanks,

- Mark
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to