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 B1FECA04B8; Tue, 5 May 2020 16:48:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9AD651C43A; Tue, 5 May 2020 16:48:35 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 9407B1C2DB; Tue, 5 May 2020 16:48:33 +0200 (CEST) IronPort-SDR: rWJDTUUpe1hwHNTQSMYpaoKCSNo2fLJTQWk6FthWP6qSJkS0JPlRpYIrU/O3oG8XhsQMCDx2Uv kVosTNd/prnw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2020 07:48:30 -0700 IronPort-SDR: wQe3OLkjO9tkZcMj2W4MZ1hKOTzQg6mxsQMBC1MUgnoviH+b6XIVLMLEX8g0rQlbU3acdPLS4P CiJIerFA4NQg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,355,1583222400"; d="scan'208";a="461415328" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga006.fm.intel.com with ESMTP; 05 May 2020 07:48:30 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 5 May 2020 07:48:30 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 5 May 2020 07:48:29 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 5 May 2020 07:48:27 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.175) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 5 May 2020 07:48:26 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EZiIRK0ZCX91ho8RSvCWQfXC9iNDD++NAtnZCpohXZOj0mJ/K7OiYyZirTgYfGlJXDZKmqHAfUnGPSkgCktPF4VRJvP7TER+BWGoh1YyWUDLPez8c0GOEs0wV9HGPcFC1TxRHBNUSzEBv5HLZj/wNFIhQm63cXebwbqkhXgnxJejgSngXcWQaNfPMNDB9GWNZdhfHSmse3ZAj9Uy9cYdp9Xq1jelU59fhRxUm0r10YqOpCxS4gB30u6+2Nvu11i4WX25fXdXdpG+2dbhrLJAHzLkKz6A+jYXeXCy60z4WjwUsgrPxlCxTWG1+srNO5BqBYgaMbGwjCV+fbk/jz+C3A== 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=+UiOM/S4c3S0AX0YAYAXRuRcI92X/AECsXia/TWU9Fs=; b=mD7XxWV04YPPOEQRh1bnEun3dC+KS4wtm/SZXyh+R5TBEnKuf9RdiMuEXvy3P7DJAJ4EBNWRZ2L03Nvk8ILMvesi2Y8oaN+21eEpTIqRv5Z/XnyKjBcq1zmzxGtl+27dmHxG+68omXQsY8OlA17xj4O8q+icqVT0KwSkgHL9u+N4N9QJspXL79HNwfIrqzFLWGAbIkN3PRo9J7YhwugohAeH6X/Qch2+pa/FWhZ/PIA9j8CKKZGS7jeFuBJ79BFXCsen0Eb/drvFx4QobLOVD+jYBEMpAMmNqxzy/+B1B69dUAd62RAZukUskug/8h0xnBLbZGJHPCT8wUMu4zWfIQ== 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=+UiOM/S4c3S0AX0YAYAXRuRcI92X/AECsXia/TWU9Fs=; b=fQljyrb/3ZgKH6LDgGZLXyIpMLPce4nTybhpb8hBhqOKuKjdBB79alpMLnW+fMSbrvmn245odmMCoTe9ERFZhjrg2KhyIUGozKEuAJBYdIGkZCb16JBmMvMbPLf2aGEWcIPwLtkLDQf7xTzRf85bjI1t6ehFDHBFqyU9j3dv3PI= Received: from BYAPR11MB3143.namprd11.prod.outlook.com (2603:10b6:a03:92::32) by BYAPR11MB3432.namprd11.prod.outlook.com (2603:10b6:a03:8a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.27; Tue, 5 May 2020 14:48:22 +0000 Received: from BYAPR11MB3143.namprd11.prod.outlook.com ([fe80::5917:9757:49b0:3c49]) by BYAPR11MB3143.namprd11.prod.outlook.com ([fe80::5917:9757:49b0:3c49%5]) with mapi id 15.20.2979.025; Tue, 5 May 2020 14:48:22 +0000 From: "Van Haaren, Harry" To: Honnappa Nagarahalli , "dev@dpdk.org" , "phil.yang@arm.com" CC: "thomas@monjalon.net" , "david.marchand@redhat.com" , "Ananyev, Konstantin" , "jerinj@marvell.com" , "hemant.agrawal@nxp.com" , "Eads, Gage" , "Richardson, Bruce" , "nd@arm.com" , "stable@dpdk.org" Thread-Topic: [PATCH v3 1/6] service: fix race condition for MT unsafe service Thread-Index: AQHWIBUhC/dnQqClr0eu2+Mhx5LnJaiZY0+w Date: Tue, 5 May 2020 14:48:22 +0000 Message-ID: References: <1587659482-27133-1-git-send-email-phil.yang@arm.com> <20200502000245.11071-1-honnappa.nagarahalli@arm.com> <20200502000245.11071-2-honnappa.nagarahalli@arm.com> In-Reply-To: <20200502000245.11071-2-honnappa.nagarahalli@arm.com> 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: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.151.162] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 955f5b46-5331-407a-d3cb-08d7f1035beb x-ms-traffictypediagnostic: BYAPR11MB3432: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2958; x-forefront-prvs: 0394259C80 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: SYhEcIvqbBs2o3dgkp4JiA0nqSbo3LxswFKwl4yVlS1oO5MFL2PHldxQw9K6CqgcXXC7Y3CaTnAQrHs35PsDydJ7kObJDBK1CCRvjRJV4nCRorJysGTUlU1I4/QGcdaitD85na/yYorvsyWGXnQ2JcbrBal7mY+fSNQp8EPqiNpwTnlwnebx8jq7R+8prHMnpR+rRzMyvtzJnmqamGNIvmYACxCFvbe5ij3ionjg1qT+izhabE5Ue8y9oFpuGE8M/wXLNly/8LTWq1yk6nszNs11s478QKAT1f3nmLWjIHeZek9GdzxU7V7kneWbF659kIyzZs7Oh1ZtKJfE8guheCmnpL+hJ+MT62ZMLN1Fln0gYepWwkXqz1jQXXkVDM77J+j7jsXlRnDGoMlnoMdRJKgppWIPX6qtm7RAAQYaN3WrYD/H2vOT6NKl2NBpUvaNFLc5jvybC0b3B7MpMMwc3sF3RaJkH34MpkhzNu0KB9hWnqYp3cCt5v9TwHNiuIl9HQWp07naNMYmFyvB0qLh2w== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3143.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(396003)(39860400002)(366004)(376002)(136003)(346002)(33430700001)(186003)(26005)(7696005)(55016002)(9686003)(53546011)(6506007)(86362001)(4326008)(33656002)(478600001)(8676002)(2906002)(76116006)(8936002)(33440700001)(71200400001)(66476007)(64756008)(66556008)(52536014)(66946007)(66446008)(5660300002)(54906003)(110136005)(316002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: oCVYLXih6zlVS+GDQ+DNR5+HPoJTV5ePTNqJvKXGQl0GPG0LXtjxzuFEWbLnAr0Tbetp6rBU+/fuS1HxDpQTxQ/q1YPYpkujyEcExcGbKxHIP2MYQ/o1yt78FNdXmw4l/Us7bjlOFU3AEVI4Qy+dwIoUPe0/A/gHV+NrN+AetPGl7Mf/4u+kHiutEtmaixReldSKWDCnXTmTh8QG2C0uRR9vNPz9O9OAuRa30yBDYkiTO0eM0CICpVEspiXUBR6XkbamTD1pQ3/FOAtvntpgjjYfn16xcz3XQiu5GjXb4z3VJkURAxT6G09qbE0I1plb3LXmXdtDTCfj67YuuSCkWwYLVUFXyPu/nBcbELrY5wqNPXxyCJzoP1xSn8Tf40iS+RIwTYBNJzrfsCN1yGVy9cdl8LxEWkje0Dij7/+Wa92OElbT4Dy4VLF2PYoXlJI3JyqjdQhbVag9y3TI6NxCMsUMnLjTCdpIzWxp8cQ+gAflyLUwiamyq2alwjjc7Lf2dxxQ9Bg3QyWQCTcpW8P2hA0bl7fFFGsD+XFq6B1a+AqHdQSPE/aWGvRtntnDM5j6XV9wZFpAluq9FTMQyrURbwbm2AEFk99y0I5hMiQWDyUmERjfQdpD+qUa7R1tSMZbHRlhdh+QxVAq4uw7rQZCWuhmUTSu/MFv7lMhngWFdnAWuIUXLyURSlgAFMKWRW+8uwXgxKmI0m+O7yM0dhSfRaIBkQHwpKQjJ46+WF/Pgt74YChvNLiH99Juda50t/YCupJ3i78C8kQUAVJLWGPHpq+5nLf1zTgJTweKjd8xe9pN1CRoG9JMyPWRBWx2eKWT Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 955f5b46-5331-407a-d3cb-08d7f1035beb X-MS-Exchange-CrossTenant-originalarrivaltime: 05 May 2020 14:48:22.4422 (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: OFR3CvuzLzYdRu5kz+GKpzm90ulEZdEGui6Tgv4Cy8aAHKFwxOUcGQ+QougMvEMPHsnZkF3LYWHC2tENadvRAfX+TBUrbmXGJ+f/aD1+Mcc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3432 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 1/6] service: fix race condition for MT unsafe service 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: Honnappa Nagarahalli > Sent: Saturday, May 2, 2020 1:03 AM > To: dev@dpdk.org; phil.yang@arm.com; Van Haaren, Harry > > Cc: thomas@monjalon.net; david.marchand@redhat.com; Ananyev, Konstantin > ; jerinj@marvell.com; > hemant.agrawal@nxp.com; Eads, Gage ; Richardson, > Bruce ; honnappa.nagarahalli@arm.com; > nd@arm.com; stable@dpdk.org > Subject: [PATCH v3 1/6] service: fix race condition for MT unsafe service >=20 > The MT unsafe service might get configured to run on another core > while the service is running currently. This might result in the > MT unsafe service running on multiple cores simultaneously. Use > 'execute_lock' always when the service is MT unsafe. >=20 > If the service is known to be mmapped on a single lcore, mmapped is a typo? Just mapped. > setting the service capability to MT safe will avoid taking > the lock and improve the performance. > > Fixes: e9139a32f6e8 ("service: add function to run on app lcore") > Cc: stable@dpdk.org >=20 > Signed-off-by: Honnappa Nagarahalli > Reviewed-by: Phil Yang Acked-by: Harry van Haaren