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 E81D3426C2; Thu, 5 Oct 2023 15:22:45 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 849DC4028A; Thu, 5 Oct 2023 15:22:45 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 2AAE34014F for ; Thu, 5 Oct 2023 15:22:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696512164; x=1728048164; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=G2MzkvHwbwd6Ez099+vuvcaILqkky/FI40YPHUt82+g=; b=ljG+xoa3dMIWBrxoQeWTgZVRJ0FS/7GQH1xBeorqiFi5KoxilR+MoLHc Mg0lNCH5hL7NXVQcShZJbDo2J4vFe02YU3Th6VYdqQafuk9YzFsF+v3jY RP/b20byHyRquCoYEC//8EbDVJDAUOP1HHXx9hrQEwlc+k4uC0DsJpr+O 5t5XMZNPDqOW60fZAPtSjRiM8pwWE+bAQJy/c7lbs8Is+UsRFB1vFD+j5 koeJJqrHgJVmZQitXughrAQAzhayrxIRxwMc0LKUOGX1lxSl7yLdRFXgr euivUPYarZhxq9EHW9inB8tmzIYT+kQqtZZztlZjwPKxO0F9eOp8Ah1Wh w==; X-IronPort-AV: E=McAfee;i="6600,9927,10854"; a="383391474" X-IronPort-AV: E=Sophos;i="6.03,203,1694761200"; d="scan'208";a="383391474" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Oct 2023 06:15:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10854"; a="786961690" X-IronPort-AV: E=Sophos;i="6.03,203,1694761200"; d="scan'208";a="786961690" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga001.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 05 Oct 2023 06:15:59 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Thu, 5 Oct 2023 06:15:58 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32 via Frontend Transport; Thu, 5 Oct 2023 06:15:58 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.109) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.32; Thu, 5 Oct 2023 06:15:58 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MKCU9ZRxFen99sgA4nA1RcRhAhpz6eXwetOVJQGLAEU0SJEJUwPGfNVbpEkLSvT+b3EijCiewJEJM3qSXdDJb2ztuLB3LfVdmnnmt6MICDuUSwabg4J0J/R0y3Ssuss18fYZw8yQ4s4yqOJm/8V7/s5JBYumLYQ1aUoZKAeLg6OW97AH8H8NfoW89C1x4pjvxCiiDK4NDTa4Wt9LMjCAv39TkCray0jqdqPJmEmUlJSZKnss8pEjIFQATosKRJEY/NSSamfcZSjWVvD1T1FOR6FS2mWJuspqw0FPk9ZaQ51YAG8cy2dAgYuwpVUsagI91vlfHDBEsm0dKLt+Vrh6Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8PAJSJyKA++7kprWBdCdRUy8IXbWTn/kW7aWMspvST0=; b=ACOtkpnKwjkZDxV4mAieXVwrmAMCoi9MbaQeqbyvC6DZ1meUCmiPuC+BJGjmWyLw978grBJW5aY22GvKQPJ05XDtFKm7bjrDqVy+NCRAA70O8bBQXBswczWOAhuY632j6W77jrzRzuojjpz6MAKg2gTyZ6+TNJK5koWe0mK/+gEANRyZAo0rr+6AilzCXjQUVl1rqUhIeCpXEJL0HRhhhFe2TAShwKXIhaqlHGJaS0+CSYwQy9jnk1wXCEqIx/HWO7UP0EztMInz/Js5mrFi3AyNK4CA1KBXdpcKX5NBpvB5b1BYkRJjzvxhOd3BVHjWy96/v4Gi3yv1oQnESbHUOw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by LV3PR11MB8693.namprd11.prod.outlook.com (2603:10b6:408:215::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.33; Thu, 5 Oct 2023 13:15:55 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::aa85:ead1:baa8:c652]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::aa85:ead1:baa8:c652%2]) with mapi id 15.20.6838.024; Thu, 5 Oct 2023 13:15:55 +0000 Date: Thu, 5 Oct 2023 14:15:48 +0100 From: Bruce Richardson To: Jerin Jacob CC: , Jerin Jacob , Pavan Nikhilesh , Abdullah Sevincer , Shijith Thotton , Hemant Agrawal , Sachin Saxena , "Van Haaren, Harry" , Mattias =?iso-8859-1?Q?R=F6nnblom?= , Liang Ma , Peter Mccarthy , "Honnappa Nagarahalli" Subject: Re: [RFC PATCH] eventdev: ensure 16-byte alignment for events Message-ID: References: <20231005115101.12276-1-bruce.richardson@intel.com> Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-ClientProxiedBy: DUZPR01CA0087.eurprd01.prod.exchangelabs.com (2603:10a6:10:46a::18) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|LV3PR11MB8693:EE_ X-MS-Office365-Filtering-Correlation-Id: 7a4b3ee5-e2dc-4b13-fc1f-08dbc5a5350f X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dDxnWmylaQQ4qZqPX9qnftG/K9RvXtOmpED/CYZwYZKRqpTfLiriPpsIuRMg8adBrSavWSCvc+mb+xvo2nVKtEwZBtMThlBYfkD3JL0zP4WYR/ByDL6lyNn8CZf49ZHk7X6y9yleOeVPL3c7duZ8fCxJamPcK+1y7DHnJwmmB7gMqgXebci0S7qxBbqdqJ5RcIIaf+Uo/AqAyoggcozHefJ12sEkBpwMVDo2eykL30Iu/sIx5N6oBb2R7QLtD9iQ1M1XOCB3SsYMXGt7JbGhJceY/+QWOYmWorzLrg0XCSEET/kygBkMONsrSw+cEiDhAnpK/Az0n5yOvSqCUOQyANw9zDCdmib7wkPldZV91Tpf0cnI1U6n0TO71ab+THoksrau9pSsebM+Z7HPniGRoNss6gWB/T/H2fsKuz0ANcD3QkmABk4ruTnSwmZ4GIju4avFdb+GSkQcLTbKajKtFriIqkEKnSw6SWN1zZ2RyQIZpN1TjZL+PaQ0Psl/51jsw/0WOAOBBVRd1NKbNLitzgm+OWL1Ehv42yc6RLUgm86Gm8gT+MRqy48nNadDHssI X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39860400002)(366004)(396003)(346002)(376002)(136003)(230922051799003)(451199024)(1800799009)(186009)(64100799003)(6506007)(53546011)(6666004)(6486002)(478600001)(66556008)(6512007)(38100700002)(82960400001)(86362001)(2906002)(8936002)(7416002)(6916009)(26005)(83380400001)(316002)(4326008)(54906003)(5660300002)(41300700001)(8676002)(66946007)(44832011)(66476007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?T1pIZmJGTzNWMnFrVitLUkY5V2pMT09JMnVaMmJMZkd1c3p3ZDU3d0Y5N2RN?= =?utf-8?B?c1V1RHpBQkFIY2cwZ2FhMHVXTXNTRlczWFZVTGdYQ2svUVlIVEtGYTZCbnFo?= =?utf-8?B?UGk0ekpITVpoU3o5Q25oVlhKam1yZXVjTEtyZ2R0dzZhK1htR1hja1FsTXF6?= =?utf-8?B?M0s3dWhRbVNkK3NhQkU3TXFsYjFZZmNNc0pJblcyL21QWEhqeWhmZzZMTElx?= =?utf-8?B?U1hPeUE5WTdrcnAwbUN2L251dVJVWU9YZ1NjaVpKVUVkMFNDSXR3Q0U0bmVV?= =?utf-8?B?eng0a3NHaVZWNTlvdVJwVnBmZ0d1VVlkUThzOXpCYjdUc2RETUdaYVJYYXpM?= =?utf-8?B?dUw3dHpYL09ubWJITklXSDZwNFNVYmRQZGNPMkFxalZ6c0d0TlAwVXRSR1dY?= =?utf-8?B?TGh5a1dNWkVzK0pHM3ZuMkMyU0NwZTFZV3VKNW0yZE8xZ3JoSXIrcCt1b0xj?= =?utf-8?B?allieEJabzlKO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7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Oct 2023 13:15:55.5993 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 1iEvZ+OtmKwoXXJK1tCWC1F6o24g6xjqnThCZXeD2GeZgJ0g3EGIlDcl4h0KqPSWzKmScg2Y0l6Os96tWp1heIM+ChVaVdglXhsT7cLhp5I= X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR11MB8693 X-OriginatorOrg: intel.com 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 05, 2023 at 06:41:34PM +0530, Jerin Jacob wrote: > On Thu, Oct 5, 2023 at 6:01 PM 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 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. > > > > > > 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 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 need to use SSE directly. If we mark the event struct as aligned, it should help 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. /Bruce