On Fri, Oct 06, 2023 at 02:15:00PM +0200, Mattias Rönnblom wrote: > On 2023-10-05 13:51, Bruce Richardson wrote: > > The event structure in DPDK is 16-bytes in size, and events are > > regularly passed as parameters directly rather than being passed as > > pointers. > > When are events passed by-value, rather than by-reference? There are no such > examples in the public eventdev API. > > To help compiler optimize correctly, we can explicitly request > > 16-byte alignment for events, which means that we should be able > > to do aligned vector loads/stores (e.g. with SSE or Neon) when working > > with those events. > > > > That change is both helping and sabotaging the optimizer's work. Now every > stack allocation needs to be 2-byte aligned - in DPDK code, and in the > application. > > The effect this change has on an eventdev app using DSW is a ~3 cycle/event > performance degradation on an AMD Zen 3 system, and a ~4 cycle/event > performance degradation on a Skylake-generation Intel CPU. >
Thanks for checking - this is the sort of feedback needed alright. In SW eventdev we copy events around alot without using pointers, so I felt that alignment would be helpful to avoid issues with events spanning cachelines. However, since it has negative impacts, I'm quite happy to drop the idea, and keep things as they are. I'll mark the change as rejected in patchwork. /Bruce