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 83A5E426CC; Fri, 6 Oct 2023 09:20:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 09F5B402AF; Fri, 6 Oct 2023 09:20:11 +0200 (CEST) Received: from mail-qv1-f54.google.com (mail-qv1-f54.google.com [209.85.219.54]) by mails.dpdk.org (Postfix) with ESMTP id 5F9DE402A8 for ; Fri, 6 Oct 2023 09:20:09 +0200 (CEST) Received: by mail-qv1-f54.google.com with SMTP id 6a1803df08f44-65b0383f618so10374396d6.1 for ; Fri, 06 Oct 2023 00:20:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696576809; x=1697181609; 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=19xIarv/jpC2De3ZYdh8ob4ldPFVv+IsVnjsPTlG99Q=; b=SzjFsFoEFQ9pYk6t9CXsLDzoH+TB48YlrduzOxKNduqWpxvjM+MCcGAMa5dMrUuxuk Ebt9RroARf+Qcc40lsMT6bLHYUgL/9AjC02Mt+41kW353OaxMzBzAnVO/4XEm8Q8sSPN YvkOTQkjFK/9XHcdFy51IMll/IgsCgSUFSHrpEJ0Q3pWvy1KJiXQU3uwqJXTJSJCInSo ZURLWDTfCXgbLf47MjQ4EbT+K4K8BwDPr8sDqNhyy5xvlbNqLghwwLGl+LGKUTX8XGCj tRzQIyP57RTGp597L7T2EmnRqUllMJB8jfR7j5xcEPi5rjdAg2PBW/0ry1xU3f9wzB70 1YFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696576809; x=1697181609; 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=19xIarv/jpC2De3ZYdh8ob4ldPFVv+IsVnjsPTlG99Q=; b=SymWbsQmoGAy8mz++jcOKqE/2bLVJUzcAwaYJ/ftFoF0+7jjqGYTHFMboXe2ZlFB52 qRd4jPuPQCtUla9TC+LS82ajLS1xUMVIB1GPW29CTKORP60nKMF2H3mUVZqzLgLjvHIb wTKLR5dxpK3WIXZGmyruwhZ3Wx7EJFBi5P5v9d1sp+/KimIBryUg0OKG2/3oz2FgpnIV MehbnlFK27z+dM9Y8/NcHaC1PceO8c/ygiQ7Nd1Kp5D34TCDqUgkJ4S6yndLrS4zdMjt 7Wz45MWSazXWR2Uq8TWr+ZMJC7WAP+f6esfG1Hv0CNCtxbnwixuJ4e+dJccFHg1s20N9 knsg== X-Gm-Message-State: AOJu0Yxy2V+0tAYsS+gjm/C17CMl2A90QggIai2blTxU2XJCO5UKnRk6 LtJzYC2reUSrLsMS9rPPp6+Vap9/Dspvr1rzOHE= X-Google-Smtp-Source: AGHT+IHLhmBIJUIAX3mkLZQrslG7qrtHrhykFx3kIeZAatFOnEQiQZ0GglMheWSewrWJZh+nvACka+/lnAZTtxcvtcw= X-Received: by 2002:ad4:514d:0:b0:65a:f100:d433 with SMTP id g13-20020ad4514d000000b0065af100d433mr7294714qvq.18.1696576808648; Fri, 06 Oct 2023 00:20:08 -0700 (PDT) MIME-Version: 1.0 References: <20231005115101.12276-1-bruce.richardson@intel.com> In-Reply-To: From: Jerin Jacob Date: Fri, 6 Oct 2023 12:49:42 +0530 Message-ID: Subject: Re: [RFC PATCH] eventdev: ensure 16-byte alignment for events To: Bruce Richardson , Thomas Monjalon 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:52=E2=80=AFPM Bruce Richardson wrote: > > On Thu, Oct 05, 2023 at 06:41:34PM +0530, Jerin Jacob wrote: > > 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 re= quest > > > > 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 work= ing > > > > 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_eventde= v.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 a= n RFC. > > > > Are you seeing any performance improvement ? Look like only DLB2 > > driver only using SEE or AVX512 instructions. > > > > The idea would be that the driver code (and eventdev code) should not nee= d > to use SSE directly. If we mark the event struct as aligned, it should he= lp > encourage the compiler to use these instructions under-the-hood. For > example, when copying an event, the compiler should be emitting 128-bit > loads and stores for most platforms. With limited testing, there is no performance regression is seen. In fact, the compiler is generating the same instruction stream on both cases. If there are no objections from others, Please send v1 with "ABI change" update in doc/guides/rel_notes/release_23_11.rst. With above change, Acked-by: Jerin Jacob NOTE: I already made PR to Thomas for rc1. Since is needs to part of rc1, I need to sync with @Thomas Monjalon as well. > > /Bruce