From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0441EA00C5; Sun, 26 Apr 2020 21:30:11 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 930F21C18F; Sun, 26 Apr 2020 21:30:10 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id B63E91C127 for ; Sun, 26 Apr 2020 21:30:09 +0200 (CEST) IronPort-SDR: WrrQa8RwajNUcT3ZkBYCXYYsOROOZENRFqUtdseuHBqQo9XXl7uPQpcou13AjboB4Z+QO2KbOv IWbdRr5ovD1w== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Apr 2020 12:30:08 -0700 IronPort-SDR: Wf8u+iJ+gvZK2/B3+MvDzX2GJYYGvWcMB6oYbUUNJVUIBV3L5V7bqCxJhnSb+gwM93mssdxQXM NS3obAg87DDw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,321,1583222400"; d="scan'208";a="366939146" Received: from orsmsx105.amr.corp.intel.com ([10.22.225.132]) by fmsmga001.fm.intel.com with ESMTP; 26 Apr 2020 12:30:07 -0700 Received: from orsmsx154.amr.corp.intel.com (10.22.226.12) by ORSMSX105.amr.corp.intel.com (10.22.225.132) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 26 Apr 2020 12:30:08 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by ORSMSX154.amr.corp.intel.com (10.22.226.12) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 26 Apr 2020 12:30:07 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.108) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 26 Apr 2020 12:30:07 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cxDStkVqK1+ya7n8RHnUIQFOSoGRwG2LCRdm0tPV/uDUJUSPnMn8joB/pkRbVu4b8cW5wKwAmOYFcLcqeiF6VpXYsWcDK7fP1ds9pyDARvIt7Ae5WpdLaKY6Qy2gYCcTrNTZ4TQglYKqYmBc1lA/mCzyZDWAFcCduQrrblMup5iifFNlGeaWwSdpMa929lKgaO0y3UmPEPWxKibRKlVVqNySDnuoxbTVSYHq75/zeZBA6ChRYv3aaunL/ch51m8Fwx7KE1ATjQ9xNKcfkpryNMzg3gEkMUAsqYkmbpHyRgt+ENmvHGE74kKXKNpKEeOc5qnvfDJvwYQVwKaZ/xI5OQ== 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-SenderADCheck; bh=2OiJ/IFLjWMkjN7R4GBdNIvjRjpi9I+al+/1RjqfzGA=; b=B7nqlH9ZGEg1kJEmXvgG1dzThZFxf7g/GzWrBMxTib3YP+0DeeaVF2c3UNdsplEoodNI+euN9SFJNg5u9FtBZYTVRGSyYkKM37Su6AEtJsVLWjuy+uOPFOivKoxsapPrrrn5f7yt/wnWiNHopbmR6Hjtx1Uj9HiQ0J0/fIdTGUh9vwmh6GF/Hj8IyitKA4CgN0ru+HOs+onKp4ode+gV8LAfcRl4C8qeVUsJ+WUVoKWQ8WwBf+RxWaFzFBLEVEyj+JKtmN7owGGaWqwOPliDpJfOcylMm+kYU5VeFJsvqU6tiaODhVtm300a/SLMptnFOV4H+wZGQQnUMbMB86PwTA== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2OiJ/IFLjWMkjN7R4GBdNIvjRjpi9I+al+/1RjqfzGA=; b=bvhneiX+qnFgJuToxKtDr/83MfgE2/C0aYJfBJZP+7Taj5FBesEITdq5KrWx4aFmC6wnYWFVeZntDMmyIi/2AaV99XCUDxpD4Hi7+khaqBycu8CwxjcJmM2m/47AU9KRM5NKG9qkaJG2g/xJMMdcnSR/VpBQkNvTO+UKr9KXlWI= Received: from SA0PR11MB4656.namprd11.prod.outlook.com (2603:10b6:806:96::23) by SA0PR11MB4752.namprd11.prod.outlook.com (2603:10b6:806:99::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.13; Sun, 26 Apr 2020 19:30:06 +0000 Received: from SA0PR11MB4656.namprd11.prod.outlook.com ([fe80::6400:b873:7752:50b4]) by SA0PR11MB4656.namprd11.prod.outlook.com ([fe80::6400:b873:7752:50b4%4]) with mapi id 15.20.2937.020; Sun, 26 Apr 2020 19:30:06 +0000 From: "Carrillo, Erik G" To: Phil Yang , "thomas@monjalon.net" CC: "rsanford@akamai.com" , "dev@dpdk.org" , "david.marchand@redhat.com" , Honnappa Nagarahalli , Gavin Hu , nd , nd , nd Thread-Topic: [dpdk-dev] [PATCH v3] lib/timer: relax barrier for status update Thread-Index: AQHWGgmNILfiVidPpU+iYU6S61Blz6iKFsmAgADv1YCAAE410IAAIrWAgABWdCA= Date: Sun, 26 Apr 2020 19:30:05 +0000 Message-ID: References: <1587398752-9345-1-git-send-email-phil.yang@arm.com> <1587713042-527-1-git-send-email-phil.yang@arm.com> <1873559.ZhSLo9btvA@thomas> 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.2.0.6 authentication-results: spf=none (sender IP is ) smtp.mailfrom=erik.g.carrillo@intel.com; x-originating-ip: [136.49.135.17] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: fbff39b3-a5bf-4ffc-3783-08d7ea18398c x-ms-traffictypediagnostic: SA0PR11MB4752: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-forefront-prvs: 03853D523D x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SA0PR11MB4656.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(396003)(136003)(39860400002)(366004)(376002)(346002)(33656002)(15650500001)(66946007)(110136005)(81156014)(52536014)(9686003)(64756008)(2906002)(8936002)(66446008)(8676002)(316002)(55016002)(66556008)(71200400001)(6506007)(478600001)(66476007)(54906003)(186003)(5660300002)(4326008)(53546011)(86362001)(26005)(7696005)(76116006); DIR:OUT; SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: vfWKC8EDDpX69jgZKiYO5xLVRvsXj/Ynk1BWXvoEzBWFcYWt21tOFj3UUuLL/v3km7T4VQ0PukW6hMC7LaJqRMb70WOHXCWoC8U5w8O86tQzDQy9npO1WAkbtlcLLNi8BTL5zVQWUsJU7GRGSXF4rLf17dhdCZJngGDIVmPXlcdkDUTMFk6FdjFrPBhk7pdvNDRxTYnq1tsI8imkOPXSImFSzu5Z9CvZZPGP3qrYUPBayqZROYmWglAP+mlOP3I4JB0WzcdVsi6IRPJkgwR+mBsSD0ycrs8ayKg9EpNae9NVcmiPMnUM9yZ4MWKCKw6vI/EzUGPuoXniEOiJ1YLNhYrjgcY3+9oHt938lrjGN9PvdYX4Egag/l+wJEwAQIxhDNcJR8u490jCrOkXknJ+YcrIR2xG8/vTTeeAAgY3UhvyMZhcHG7zC1c6ke99iTdl x-ms-exchange-antispam-messagedata: 0GkoptHsENgoq3KPfAbErOdgGgHJdE++aAbfKcp0UCpKKwUCme5UUN5Rrlysi3wzPVOcGql0G3yT3he7aBFMdbh5YBC0czuKlj3Im8DVXlmgGTEIOTYuFZqd2vkGJZb8xsJfBmXgT9BiErRe6MX2RUa3UNGthhElgKDcHn00hupVWLF2r+P7a7mwPkSFjWlDccC01GaQj/cjQAwFBLF+2zCbIuU8NrJzC7pkn6tsEP/IKggNjC0Lf5VDmDqb3TokYZRZGiq2vC7AtLSCGtWlJki9grqF2hMwcOhpx1P5ap/rtIW3+9xdcF98iVGK/8NhWxFn8FOo8TCxGTBueWxTyED1p4gxDiaQYaC5M50oMwLj8/3lsOE2oHU5vWM09PQ25BT4FdQC6SNA7FnP4Mh3lE0ABPc5stPJjy3ilIc70iHJcchejWAQZDzK/zFcoiwfNR6NoUz24KiJXSv9IYZV1qOLCytcbmvfsMNUqP8SqEsAUqPaRL/aKJ9Nv01itfqdzNxUyeSQFDFUStfMKxKQ1N6+ps1opod+IjhsYdmz0olDT5pnXG7wB3bh1p38MzfPwdvZ5MIPR19Q9ZtVJ79N7jZY+Sy6CLvF0RrbW4th8RQT6vnpAvJlcjojeTg/wG0BknE4mwttiFGvF1nHqNYmH4tQ0KRWm+Q0bRDLYnxkdPjawtYyiLaLxgloFuzV5KIQ9cRs09gp5s/eq5MYZ6o25nbrI7xvbud7Cuy4su6Gtsouw7vvM0jJLJnFW8gO78NkBfmHkhmN/wRL4YSssEyCxzZ3HFO4kNGLZiRqG//Nklg= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: fbff39b3-a5bf-4ffc-3783-08d7ea18398c X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Apr 2020 19:30:05.8574 (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: BePiibyeWYmPbh+GqNFBhYd5TqYPCKy39CHBg6wOe6pil4c8oc7akqXP2XJGabGfZ7Pf2LblO+YXeJm/QZB5DeqIEYyb1T+V93oXXXyJMn4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR11MB4752 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3] lib/timer: relax barrier for status update X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Phil Yang > Sent: Sunday, April 26, 2020 9:20 AM > To: Carrillo, Erik G ; thomas@monjalon.net > Cc: rsanford@akamai.com; dev@dpdk.org; david.marchand@redhat.com; > Honnappa Nagarahalli ; Gavin Hu > ; nd ; nd ; nd > > Subject: RE: [dpdk-dev] [PATCH v3] lib/timer: relax barrier for status up= date >=20 > > -----Original Message----- > > From: Carrillo, Erik G > > Sent: Sunday, April 26, 2020 8:19 PM > > To: Phil Yang ; thomas@monjalon.net > > Cc: rsanford@akamai.com; dev@dpdk.org; david.marchand@redhat.com; > > Honnappa Nagarahalli ; Gavin Hu > > ; nd ; nd > > Subject: RE: [dpdk-dev] [PATCH v3] lib/timer: relax barrier for status > > update > > > > > > > > > -----Original Message----- > > > From: Phil Yang > > > Sent: Sunday, April 26, 2020 2:36 AM > > > To: thomas@monjalon.net > > > Cc: Carrillo, Erik G ; > > > rsanford@akamai.com; dev@dpdk.org; david.marchand@redhat.com; > > > Honnappa Nagarahalli ; Gavin Hu > > > ; nd ; nd > > > Subject: RE: [dpdk-dev] [PATCH v3] lib/timer: relax barrier for > > > status > > update > > > > > > > -----Original Message----- > > > > From: Thomas Monjalon > > > > Sent: Sunday, April 26, 2020 1:18 AM > > > > To: Phil Yang > > > > Cc: erik.g.carrillo@intel.com; rsanford@akamai.com; dev@dpdk.org; > > > > david.marchand@redhat.com; Honnappa Nagarahalli > > > > ; Gavin Hu ; > nd > > > > > > > > Subject: Re: [dpdk-dev] [PATCH v3] lib/timer: relax barrier for > > > > status update > > > > > > > > 24/04/2020 09:24, Phil Yang: > > > > > Volatile has no ordering semantics. The rte_timer structure > > > > > defines timer status as a volatile variable and uses the > > > > > rte_r/wmb barrier to guarantee inter-thread visibility. > > > > > > > > > > This patch optimized the volatile operation with c11 atomic > > > > > operations and one-way barrier to save the performance penalty. > > > > > According to the timer_perf_autotest benchmarking results, this > > > > > patch can uplift 10%~16% timer appending performance, 3%~20% > > > > > timer resetting performance and > > > > 45% > > > > > timer callbacks scheduling performance on aarch64 and no loss in > > > > > performance for x86. > > > > > > > > > > Suggested-by: Honnappa Nagarahalli > > > > > > > > > > Signed-off-by: Phil Yang > > > > > Reviewed-by: Gavin Hu > > > > > Acked-by: Erik Gabriel Carrillo > > > > [...] > > > > > --- a/lib/librte_timer/rte_timer.h > > > > > +++ b/lib/librte_timer/rte_timer.h > > > > > @@ -101,7 +101,7 @@ struct rte_timer > > > > > - volatile union rte_timer_status status; /**< Status of timer. > */ > > > > > + union rte_timer_status status; /**< Status of timer. */ > > > > > > > > Unfortunately, I cannot merge this patch because it breaks the ABI: > > > > > > > > [C]'function void rte_timer_init(rte_timer*)' at > > > > rte_timer.c:214:1 has some indirect sub-type changes: > > > > parameter 1 of type 'rte_timer*' has sub-type changes: > > > > in pointed to type 'struct rte_timer' at rte_timer.h:100:1: > > > > type size hasn't changed > > > > 1 data member changes (2 filtered): > > > > type of 'volatile rte_timer_status rte_timer::status' chan= ged: > > > > entity changed from 'volatile rte_timer_status' to > > > > 'union rte_timer_status' at rte_timer.h:67:1 > > > > type size hasn't changed > > > > > > > > > > I think we can revert it to the original definition of rte_timer and > > > keep the union rte_timer_status volatile-qualified. > > > Because with or without this 'volatile' qualify, it generates the > > > same code > > on > > > aarch64 and x86. > > > So it seems acceptable to ignore it to make the ABI compatible? > > > > > > Thank, > > > Phil > > > > I was wondering about this also. Is the performance improvement on > > aarch64 still the same in that case? >=20 > Yes. it is. > It got the same performance improvement on aarch64 and no performance > loss on x86. >=20 > I will update it in v4. Great - thanks, Phil.