On Fri, Jun 9, 2023 at 9:12 AM Alexei Starovoitov <alexei.starovoitov@xxxxxxxxx> wrote: > > On Thu, Jun 8, 2023 at 11:32 PM Hou Tao <houtao@xxxxxxxxxxxxxxx> wrote: > > > > > > > >> + --producers=8 --prod-affinity=0-7 "$@")" > > > -a -p 8 should just work. > > > No need to pick specific cpus. > > No. For VM with only 8 CPUs, the affinity of the first producer will be > > CPU 1 and the affinity of the last producer will be CPU 8, so the > > benchmark will fail to run. But I think I can fix it, so the affinity of > > the last producer will be 0 instead. > > Right. Noticed that too. > That should probably be a separate patch to fix this cpu assignment > issue in bench for all benchs. > > Andrii, > when you wrote it did you really mean to start assigning cpus from 1 > or that was just an oversight? 616 ▸ /* unless explicit producer CPU list is specified, continue after¬ 617 ▸ * last consumer CPU¬ 618 ▸ */¬ It's been a while, but it seems like each consumer gets its CPU first, then each producer. So yeah, seems intentional. For context, this was done for BPF ringbuf benchmarking, so by default I wanted to separate a single consumer from multiple producers.