From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4316C426C2; Thu, 5 Oct 2023 15:12:03 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 11A5A4028A; Thu, 5 Oct 2023 15:12:03 +0200 (CEST) Received: from mail-yw1-f172.google.com (mail-yw1-f172.google.com [209.85.128.172]) by mails.dpdk.org (Postfix) with ESMTP id CB2164014F for ; Thu, 5 Oct 2023 15:12:01 +0200 (CEST) Received: by mail-yw1-f172.google.com with SMTP id 00721157ae682-59f4f80d084so10141737b3.1 for ; Thu, 05 Oct 2023 06:12:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696511521; x=1697116321; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=XVvlQIvsGcFgLp6G5lcRdEQ8XIvdSQJjm/q9HJJigVs=; b=kVdoCHfWPodNB5NE6/FJbSb7WtIpiRZ4Zr1ZjcbFqDLYFCGboNabxFmKcwh9HLYnKz /bTz3bgwnRfHoKA2jF6roFnW/Ifx2h+OhoYEoOR92NyiEPPfJpYqf7oPFrHqOdWO55Qz 3M3qjGZASagW7R2U3zD1p7DJBgtZOc37gMSsGozai2TMXcJT6mhL3G+4oe/PihXZ0Qck JbktlCX+HYhngsWmt5xYzihzzoXhEEukJgpxfqlA45BtdB7xaRGZR2YRpEsP2aeCtfRt kk2vIVpQe9BIFXcYd8aScve/mRMXv8yW26EknVfTRkt13VLDlvNhFmDubbzlkK+Ztbs3 8U5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696511521; x=1697116321; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XVvlQIvsGcFgLp6G5lcRdEQ8XIvdSQJjm/q9HJJigVs=; b=jBY9gRBsmkuCL84+NQwACvX4YV+41o8VeHU6Ymu2scv4qcCLVxbgjul4oWEP6wrdsX O2WLPR5pJbYi748eA0z6E5uNBbWV7B2H3hLjjqwlTL/X+0tnH5vYtwzKDGoR382EG/VE lU4lO8hDncmhUYRYMbXU+nqrikn80SNxCVPmrKH3DtL3hqHxdokYnHviUfV1xWLftkGi FBrGH0g0tOqX5GJw0++iBclAI22D2cgMFTqEh2JthRh1q2VZcjEv/6vi08pUaidzTT1v 4qbtmU4USfLA6J5k3yLFb8gSAK+BHFnvGy3WiQCJekd3//N7wsoCL4EgWk/GlzWFY0zy em0g== X-Gm-Message-State: AOJu0YykYlwm7LsI4yTMqtfm9/H5fZRmOnXpwLrUk8IsUlx+3WXhIF8R mIkh0Xl4DNcRFAQFm3GbAMhKOxMJ1r7+UGl5ATg= X-Google-Smtp-Source: AGHT+IF4wm6pKDebVEdST0Qyn7BS/csIhI8sDO7LRw3YAc3azQyrO2zkb6EdkLou4Pzm7iM6asfYpIKF9Usg4wYLtbg= X-Received: by 2002:a0d:d641:0:b0:59f:4ee0:26e8 with SMTP id y62-20020a0dd641000000b0059f4ee026e8mr5289578ywd.21.1696511521008; Thu, 05 Oct 2023 06:12:01 -0700 (PDT) MIME-Version: 1.0 References: <20231005115101.12276-1-bruce.richardson@intel.com> In-Reply-To: From: Jerin Jacob Date: Thu, 5 Oct 2023 18:41:34 +0530 Message-ID: Subject: Re: [RFC PATCH] eventdev: ensure 16-byte alignment for events To: Bruce Richardson Cc: dev@dpdk.org, Jerin Jacob , Pavan Nikhilesh , Abdullah Sevincer , Shijith Thotton , Hemant Agrawal , Sachin Saxena , "Van Haaren, Harry" , =?UTF-8?Q?Mattias_R=C3=B6nnblom?= , Liang Ma , Peter Mccarthy , Honnappa Nagarahalli Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Thu, Oct 5, 2023 at 6:01=E2=80=AFPM Bruce Richardson wrote: > > On Thu, Oct 05, 2023 at 12:51:00PM +0100, 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. To help compiler optimize correctly, we can explicitly reques= t > > 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. > > > > Signed-off-by: Bruce Richardson > > --- > > lib/eventdev/rte_eventdev.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h > > index 2ba8a7b090..bb0d59b059 100644 > > --- a/lib/eventdev/rte_eventdev.h > > +++ b/lib/eventdev/rte_eventdev.h > > @@ -1344,7 +1344,7 @@ struct rte_event { > > struct rte_event_vector *vec; > > /**< Event vector pointer. */ > > }; > > -}; > > +} __rte_aligned(16); > > > + Eventdev driver maintainers for review and for performance testing. > Looking for feedback on this idea - hence the fact this is going as an RF= C. Are you seeing any performance improvement ? Look like only DLB2 driver only using SEE or AVX512 instructions. > It seems to me something that should be done for performance reasons, but > I'm not sure if there are any negative consequences of doing this. In general, it looks OK, However, We may need more testing. I can only speculate the following as of now, Since event memory is allocated from stack most case, there may stack pointer fix up in code for desired alignment ie. some add/sub instructions which comes for free most likely due to pipeline. We will test on Marvel HW. Request others to test on their HWs. > > Since this is an ABI-affecting change, a decision on this needs to be mad= e > for 23.11, or else it will be locked in for at least another year. Hence = me > sending it now as an RFC late in the release cycle, rather than deferring > to next release. > > /Bruce