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 E8955A04FD; Mon, 23 May 2022 18:52:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D02BD4067B; Mon, 23 May 2022 18:52:14 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 59B3F40156 for ; Mon, 23 May 2022 18:52:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653324733; x=1684860733; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=0iIkYSC6UsnJ70iGK8/j68yP0dtbyiyM4KsNmZAzfFI=; b=KF5lF8lOohNzyopGfyMq3MaJ6amUzen7KVZDFJl+LE1Ahpk8i3i3qk1S fbSEt9EDVzr5kC9G456oAe91Jq98sI0m1HDzwskztdz0Rqyn7luR5l8zc +ORcMCVzi43wpx2hV5ZxO6tfRkf8x1BnYP+Z4vkgRcS4qQJdya1mJeseS 41uzOvrnvg1Y/gT7EnWtg+D9D/XDu5y0RqwfSL2IL+7NtYZANJ0kLyXdc rmYPgm2YzhjnVgbMH7h2ww1WfKODSGNyzcKHhBNLNmjIH1ToGdt4Pc5Tf VK74anvyfgYiDHRgE17V5WvGTgYgHC53kxnP0zMXLAxw3QDsW+oUv92rn Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10356"; a="336342249" X-IronPort-AV: E=Sophos;i="5.91,246,1647327600"; d="scan'208";a="336342249" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2022 09:52:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,246,1647327600"; d="scan'208";a="526027746" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by orsmga003.jf.intel.com with ESMTP; 23 May 2022 09:52:12 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Mon, 23 May 2022 09:52:12 -0700 Received: from orsmsx605.amr.corp.intel.com (10.22.229.18) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Mon, 23 May 2022 09:52:11 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Mon, 23 May 2022 09:52:11 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.168) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Mon, 23 May 2022 09:52:08 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HikTOrIo4MScfQlROZCAy7Jplnekj7sl0W9/DrQTqm+mbGcH97H+guF46aR/iKJWOZFnK9Ogre0yUL+EG6IoGldNLBKWYrXc7w4moAkV3RY+2Xs/RlLJ9a1A7+vv6Y0lcyNG4vcw/y4ocQEXyImKCVxVaqGQTL2peCa83kE9RXCqQaqX/PSJKgUr3fc7j2IGMETHGeDQLqkcXveEpWcmYWMKmaKPbhOig9BpuMadhGhA5Ex1P4XErXosLj6D73NIa94kEzoDS1Tra7WJIZpdDSPpY2xoJ0qf/l8VoURD4e4H2b/Glis7EheJgjgLhtzXwiHcguShfbBWGhLfXwRXUg== 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=GtbeA9xcg2ZOjYDvp6gQznWiY7oITtJUmLdkdhPiZbY=; b=bDzNhfHatRUZfItAZFPMBQgxqqnBKBGAPMu4funt3BW2a4myohz8P6YfaKZ7d+It3/klIOCst0dAKDRHOZ4E/Nqgg5JdVfwP+54HQZS3qgRWhpa1Jck+cAh3XpQaakBLaCvlXDMYFKxeO3kVctwqsg1Z1G4bLlbO3rSeSLXKccuQqGGIPaCqvdYRgZThxA7W7VVR2lTA4cP+wsQlXn0p61pdWQEQSzubOzHkLQZyKXkQbqT4vNkwHDyuoy9xbAz9YRRozKCRrpcZqhxGMnekm3OhwLXS89KA85n67LomXoaVEdRj1v6Zn5rW8LnjBcQW6PZCjPWlRp3kHe7VLeQ6WQ== 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 Received: from SN6PR11MB3103.namprd11.prod.outlook.com (2603:10b6:805:d7::13) by LV2PR11MB6023.namprd11.prod.outlook.com (2603:10b6:408:17b::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.23; Mon, 23 May 2022 16:52:06 +0000 Received: from SN6PR11MB3103.namprd11.prod.outlook.com ([fe80::e0bb:2e4a:18e9:aaa5]) by SN6PR11MB3103.namprd11.prod.outlook.com ([fe80::e0bb:2e4a:18e9:aaa5%7]) with mapi id 15.20.5273.022; Mon, 23 May 2022 16:52:06 +0000 From: "McDaniel, Timothy" To: "Richardson, Bruce" CC: "jerinj@marvell.com" , "dev@dpdk.org" , "Wires, Kent" Subject: RE: [PATCH v4] event/dlb2: add support for single 512B write of 4 QEs Thread-Topic: [PATCH v4] event/dlb2: add support for single 512B write of 4 QEs Thread-Index: AQHYbsMBrO0szOIS/UKEiZbWOBRokK0srCcw Date: Mon, 23 May 2022 16:52:06 +0000 Message-ID: References: <20220409151849.1007602-1-timothy.mcdaniel@intel.com> <20220523160955.3890850-1-timothy.mcdaniel@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.401.20 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 94eb6437-768d-453c-fe5a-08da3cdc91eb x-ms-traffictypediagnostic: LV2PR11MB6023:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: EjGvxY78ORw6zKPrcmB3H6+IjwvamGsgOl2fNme+7PQlfoWzAiHoMmVuugapSkHbDESRmkYoTvNJaPc5gWfPHhGlTLDyCOTh6Cl6VliBCkV1/BR75CpJm+dYia28YWuouPeszQ4xR1Wwvyk3E5Rghm7ndL1btZ5U7ce2itZmn1bTonBCvquST3fXJ1hVVWMwlLvQFhaZhMCcN/FYLVjDzRPy1C9ZNNPXQxPYQHTTkgxYv6Wwe0acXBpAPmCRJlLKhfvXS4weS0cQB6ayTc2qdoKbyPAVoasMpZb7Hiy34zw/loiVBHjXcm2oy/6+wJW1sc5rQe7HDjAcfYBI5zfhHovV6q6XcoontGNnZyR8rsKSLFtWvfMgqrixhA956E7nHjS0ilfs0suN5zO3IRzdSP8qhV+EDp4ESbLHC6eVSqXhxJ5S9U6Fr6P0S4c03CRq2nxFtjMxwS5COh/0ZTtKbG/6GnABhnDHaIptdf6LP365xXfirkXFbxagIFXIiX7Y6q3SvHh6F64zpLYvDZFa8cb1slrG4WlylWfwRT9pcIz23ae+hPB9akBX6dNZodsv+KelTQ3uEfWGfPesDzLHFaWQ/VQJja3CJjObo1lh7pVanisCIl1EZ1Tg+wNlj4SsRd1yqd/YcVLi0EDDyZ3xIyKdvJjCc9zvJROOlemQoUEqEpOU5Pc/p6yi6NUPrSht/eWgikF5V553PqRkKGtbwA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB3103.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(186003)(38100700002)(33656002)(508600001)(5660300002)(4326008)(316002)(66556008)(66476007)(8676002)(66946007)(6862004)(66446008)(64756008)(55016003)(54906003)(76116006)(6636002)(107886003)(71200400001)(86362001)(2906002)(9686003)(52536014)(82960400001)(8936002)(122000001)(53546011)(38070700005)(6506007)(7696005)(26005)(83380400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?mQwWw1QUmSSE8cCnIFyF6UwSlK53esu85bPOu4n/gymcQr63UUWu249kXAQo?= =?us-ascii?Q?cDrG8rhEXzMs/CzSEECFIUvlk1OjJ6uov86GjmUPyz+EihpuxkNaY1ctA96l?= =?us-ascii?Q?XEnscthCf/4xYbwWwydOaOjL1GeSeKd3uYLouz7HiUNIO6xdDhb1IoGZ6+E5?= =?us-ascii?Q?BDzAKQt94zJKIzob2vZocEjsfwu6GNR4A/fgV81qVodcrFai2s0+rDexZIdG?= =?us-ascii?Q?RIm80iMS9hV6IeFKHa+AEMUCuKAObI4TFYuv7b4KnkuRjZJD8opZIf8tkaFh?= =?us-ascii?Q?Rf+wboRzZr85hYZndjGX3OrJftcLxNLSEU/gq7W2Ty07+Ss+W/gfJ4LcRb3Z?= =?us-ascii?Q?AOhvohRFwb3owgiVxC65Yr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?Q?CUkYBdYc20JTzIWjktupo5G62poBfXFJOCPP0czni4unZxWYbQ4X3sZczQ8t?= =?us-ascii?Q?ptPVZHW5suAk0u9poZS27qS37CqY6iNPifbhfSBf5RvEHJEZY5+GzG2RH3SH?= =?us-ascii?Q?qd1QhU7q/Quh53++WgV8JP+wEuSoSAVcQyQ4hA9dkVI+fQB+ywVwCZOPF1Zy?= =?us-ascii?Q?ImfErVvWW8ilfOIqZ72kKZrA6dWJ3OQU7yFZ/ouwUHO8AP2mbffqDTlM67rk?= =?us-ascii?Q?3MOUJGmLX1gNKRvqHHt82R/qDvAwElFZuqTYgpz9I/HEJWQxyX+SfwZ7mJIY?= =?us-ascii?Q?QIy96EQJmduq9ecdmiDzjIX49QLdgle5v7p+U4gYST44duel9yxmF8u3kaTI?= =?us-ascii?Q?QUvDYHJgCa/HaaOq2T2PDJRXRitcbTGOuWCnOBxxg8eqfCoTsSFT3nqyU2h6?= =?us-ascii?Q?h6lwbyLemZO6l918IM3/GE79Hl54a9pStZ1Bfwx0JLouyzizkddQgKWk0ABj?= =?us-ascii?Q?1tSi6GCqvY15QKvqb3DzELnMQmKnIVY=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB3103.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 94eb6437-768d-453c-fe5a-08da3cdc91eb X-MS-Exchange-CrossTenant-originalarrivaltime: 23 May 2022 16:52:06.4511 (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: /qumlYRgwfve+1CfHdZndpPMUpTtUvl8Qm2Ns0wuITmUW/Uby64hUypYW3CoAc3YA0OQPjTB/c0YUMKbPSVkfLLb4iPhoIWOBjsAYfsB0vE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR11MB6023 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 > -----Original Message----- > From: Richardson, Bruce > Sent: Monday, May 23, 2022 11:34 AM > To: McDaniel, Timothy > Cc: jerinj@marvell.com; dev@dpdk.org; Wires, Kent > Subject: Re: [PATCH v4] event/dlb2: add support for single 512B write of = 4 QEs >=20 > On Mon, May 23, 2022 at 11:09:55AM -0500, Timothy McDaniel wrote: > > On Xeon, as 512b accesses are available, movdir64 instruction is able t= o > > perform 512b read and write to DLB producer port. In order for movdir64 > > to be able to pull its data from store buffers (store-buffer-forwarding= ) > > (before actual write), data should be in single 512b write format. > > This commit add change when code is built for Xeon with 512b AVX suppor= t > > to make single 512b write of all 4 QEs instead of 4x64b writes. > > > > Signed-off-by: Timothy McDaniel > > Acked-by: Kent Wires > > =3D=3D=3D > > > > Changes since V3: > > 1) Renamed dlb2_noavx512.c to dlb2_sve.c, and fixed up meson.build > > for new file name. > > > > Changes since V1: > > 1) Split out dlb2_event_build_hcws into two implementations, one > > that uses AVX512 instructions, and one that does not. Each implementati= on > > is in its own source file in order to avoid build errors if the compile= r > > does not support the newer AVX512 instructions. > > 2) Update meson.build to and pull in appropriate source file based on > > whether the compiler supports AVX512VL > > 3) Check if target supports AVX512VL, and use appropriate implementatio= n > > based on this runtime check. > > --- > > drivers/event/dlb2/dlb2.c | 206 +----------------------- > > drivers/event/dlb2/dlb2_avx512.c | 267 > +++++++++++++++++++++++++++++++ > > drivers/event/dlb2/dlb2_priv.h | 8 + > > drivers/event/dlb2/dlb2_sve.c | 219 +++++++++++++++++++++++++ > > drivers/event/dlb2/meson.build | 14 ++ > > 5 files changed, 513 insertions(+), 201 deletions(-) > > create mode 100644 drivers/event/dlb2/dlb2_avx512.c > > create mode 100644 drivers/event/dlb2/dlb2_sve.c > > > > > diff --git a/drivers/event/dlb2/meson.build b/drivers/event/dlb2/meson.= build > > index f963589fd3..0ad4d31785 100644 > > --- a/drivers/event/dlb2/meson.build > > +++ b/drivers/event/dlb2/meson.build > > @@ -19,6 +19,20 @@ sources =3D files( > > 'dlb2_selftest.c', > > ) > > > > +dlb2_avx512_support =3D false > > + > > +if dpdk_conf.has('RTE_ARCH_X86_64') > > + dlb2_avx512_support =3D ( > > + cc.get_define('__AVX512VL__', args: machine_args) !=3D '' > > + ) > > +endif > > + > > +if dlb2_avx512_support =3D=3D true > > + sources +=3D files('dlb2_avx512.c') > > +else > > + sources +=3D files('dlb2_sve.c') > > +endif > > + > > headers =3D files('rte_pmd_dlb2.h') > > > > deps +=3D ['mbuf', 'mempool', 'ring', 'pci', 'bus_pci'] >=20 > I believe this can be improved upon further, since it still does not allo= w > a generic build to opportunistically use the AVX-512 code path.=20 What does this mean - " generic build to opportunistically use the AVX-512 = code path" It also > makes the runtime check largely pointless as the whole build will have be= en > done with global AVX-512 support, meaning that the binary likely will fai= l > to run if AVX-512 is not available. If built for avx512, then that build supports using either avx512, or not. >=20 > Instead, I'd recommend doing as other places in DPDK - such as in ACL > library, or i40e or ice net drivers - where we not only check the current > build support, but also check the compiler support. That way, even if we > are building for e.g. a target of AVX2, we can still build the AVX-512 > parts using the appropriate compiler flags, and choose them > opportunistically at runtime.=20 I do not understand what you are getting at here.=20 See the meson.build files in any of the above > component directories for examples. >=20 > Regards, >=20 > /Bruce