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 775ECA0598; Fri, 10 Apr 2020 20:01:51 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 397021D5FB; Fri, 10 Apr 2020 20:01:50 +0200 (CEST) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20068.outbound.protection.outlook.com [40.107.2.68]) by dpdk.org (Postfix) with ESMTP id 0C7501D613 for ; Fri, 10 Apr 2020 20:01:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gtEVFqNCR5Aq56zVUaVvhOeT9kOC2u6tM3qOTECBg3c=; b=cdbz8sf/G54Mv7vp8LV28Wpdj/PxmGy4/cdbdjM2KLbS+kLCG8DyRN47KRSPBMfcQXWG/q+xhIY9u3CvtwUlKudMg3AbW2nvgAg7fKKKWWCiEqCsZNBX1RE0JawelrrMYRmi7pp2GntSACTdxz8269hPChNHQ4Vv9PINQhu4U2M= Received: from AM4PR0101CA0077.eurprd01.prod.exchangelabs.com (2603:10a6:200:41::45) by AM0PR08MB5363.eurprd08.prod.outlook.com (2603:10a6:208:188::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.15; Fri, 10 Apr 2020 18:01:48 +0000 Received: from AM5EUR03FT020.eop-EUR03.prod.protection.outlook.com (2603:10a6:200:41:cafe::2) by AM4PR0101CA0077.outlook.office365.com (2603:10a6:200:41::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15 via Frontend Transport; Fri, 10 Apr 2020 18:01:48 +0000 Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dpdk.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dpdk.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT020.mail.protection.outlook.com (10.152.16.116) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15 via Frontend Transport; Fri, 10 Apr 2020 18:01:47 +0000 Received: ("Tessian outbound 4b84da486446:v50"); Fri, 10 Apr 2020 18:01:47 +0000 X-CR-MTA-TID: 64aa7808 Received: from 93ea181aaa80.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 8BDA57E1-991F-47D6-AF55-1954AA5ABE4B.1; Fri, 10 Apr 2020 18:01:42 +0000 Received: from EUR03-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 93ea181aaa80.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 10 Apr 2020 18:01:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bzCX0CLsy+j6GGejCzztmePPRfd0euCBYgw4vfy8tt4ecAc5Ll8JPxjpl59aHqlwxKVbBIed+daZN2W3dDkyiuoWXGEjNzbIB1E9DoxtEIslGsYZ2ceGjEU2dEK/8cVhvZvBjhkVN640Ewqon2h5fb1oUdM1F6iahR7uwz208NEvwOpv+s3kQqAkhH1rv17ETweCN6f95zlPivyOn907J4amP1wP+8Ku5u2s1cUNJJRsT/1FszBI4k5N/KWssw5JgC6Pkr+J3bVLrAMNhzjGPjk0QwOHyIvaBQiYwSIL9nIVx5s575DTOY424IRClwcwLHI+AXlfepgqX8bCXGP7WQ== 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=gtEVFqNCR5Aq56zVUaVvhOeT9kOC2u6tM3qOTECBg3c=; b=E8HG1ervuJ6Mc2laEJjiWTYuh3xqWs2YamRcP0jTrMWiVJcpAIr+0b32DILxT1cjwQBVgZrFFVu1v6BVeyu6z/QtSktWVINVQ0h4t6Hwe3ZKt8vX9XVrqndfOumoPWD/8Bw2IM2nmiL/XM42ZziDHxQfs+zoJkIHUpr5L1aTuweoi/kgh6o2OJN8AkYLr9lQO6knnzdYeMLIHd2DUpqpUxk+jkQzflrcI8erj51sP/hBtwuxK4RUfBZi5Bt4VfsnRefe4Q+OGSwO0wSIZv7vvc9P25G0PWBP08Vf/GPmFq0UOh24+CF5ukKoW6rR2mYI5RNhHbT+P85uvWyy1uA11w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gtEVFqNCR5Aq56zVUaVvhOeT9kOC2u6tM3qOTECBg3c=; b=cdbz8sf/G54Mv7vp8LV28Wpdj/PxmGy4/cdbdjM2KLbS+kLCG8DyRN47KRSPBMfcQXWG/q+xhIY9u3CvtwUlKudMg3AbW2nvgAg7fKKKWWCiEqCsZNBX1RE0JawelrrMYRmi7pp2GntSACTdxz8269hPChNHQ4Vv9PINQhu4U2M= Received: from DBBPR08MB4646.eurprd08.prod.outlook.com (2603:10a6:10:f5::16) by DBBPR08MB4315.eurprd08.prod.outlook.com (2603:10a6:10:cd::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15; Fri, 10 Apr 2020 18:01:38 +0000 Received: from DBBPR08MB4646.eurprd08.prod.outlook.com ([fe80::1870:afc4:b90f:609d]) by DBBPR08MB4646.eurprd08.prod.outlook.com ([fe80::1870:afc4:b90f:609d%5]) with mapi id 15.20.2878.023; Fri, 10 Apr 2020 18:01:38 +0000 From: Honnappa Nagarahalli To: "Ananyev, Konstantin" , "dev@dpdk.org" CC: "david.marchand@redhat.com" , "jielong.zjl@antfin.com" , nd , Honnappa Nagarahalli , nd Thread-Topic: [PATCH v3 1/9] test/ring: add contention stress test Thread-Index: AQHWCd9R1w3FUy2800GE5i4fCZDVVqhsxRDQgAP+NICAAAa/AIAB5J9Q Date: Fri, 10 Apr 2020 18:01:37 +0000 Message-ID: References: <20200402220959.29885-1-konstantin.ananyev@intel.com> <20200403174235.23308-1-konstantin.ananyev@intel.com> <20200403174235.23308-2-konstantin.ananyev@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 6448b608-9446-42f1-825a-097c0d148d70.0 x-checkrecipientchecked: true Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Honnappa.Nagarahalli@arm.com; x-originating-ip: [70.113.25.165] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 92fcab73-83f6-4876-f8aa-08d7dd793cb6 x-ms-traffictypediagnostic: DBBPR08MB4315:|DBBPR08MB4315:|AM0PR08MB5363: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:10000;OLM:10000; x-forefront-prvs: 0369E8196C X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBBPR08MB4646.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(136003)(376002)(346002)(39860400002)(396003)(366004)(110136005)(316002)(54906003)(81156014)(8676002)(8936002)(478600001)(186003)(7696005)(55016002)(4326008)(6506007)(86362001)(26005)(52536014)(71200400001)(33656002)(5660300002)(66476007)(66556008)(64756008)(76116006)(66946007)(2906002)(9686003)(66446008); DIR:OUT; SFP:1101; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: rFGOUuOMiy2PvKh+XF7TwJ6uS6sRN9ixYsuMj51gVg7FvebDW3UbT1HNOa88oMo1x94r6GXay7LZNR7wZVYKzv/p08PrhWu9XmjCH+G5TZZxPUqbJ8WI9RG8RUGiGHapomL+Bq7cqo7DEgRqoiUe7YnL9zs+zaRcjLREOf/IAvdo3EvMXYsz624cwZkqB6tpCzvkVJ/nzvJnq7UBD/Sq2D+tNhRWZMUn5SNNxOMSI9NsaUoRBqEy6MYZJF7YChKXPtBjgGnQ738CP/tAityV3d7PZcclKjKNaKv3LUh9iW67h0t5iqrF22N2HzKU28L6BFZ/wzAfCJm1J3zSjYvz8fMMlqklLlRRHOtqHhq+VRs8GtJEhlKMOscqVMn8YGFaI5oc3rH3ExTeAiYyYoIMIhPgChjxy8gf4jL6JUjo2w9WNv36j6dUmc1f7aqevzpw x-ms-exchange-antispam-messagedata: giIzy34c5ELw0xDG98NzUA4UDA+rNJmLMe9aP0OoZVxMyjuF1uRLs5P6GnFoOIFWcBeFzq7rm3Z5iIFDj6ePfFigngTtYuttmG9vKs7bk4dODQJpoAb+TJQss7n500DZoSXQUCRggIvZHAz6AsAKWg== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB4315 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Honnappa.Nagarahalli@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT020.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(376002)(39860400002)(136003)(396003)(346002)(46966005)(186003)(47076004)(4326008)(52536014)(336012)(81156014)(70586007)(8676002)(2906002)(70206006)(8936002)(33656002)(86362001)(7696005)(316002)(81166007)(82740400003)(110136005)(55016002)(356005)(36906005)(5660300002)(26826003)(478600001)(26005)(9686003)(54906003)(6506007); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: de1e129b-152e-44bb-a1d5-08d7dd79371a X-Forefront-PRVS: 0369E8196C X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CK+PPt8SYYlI6bABf3rmSxwNlypBLPbIWOWXQWs0YTw8ZvHZokIMyCkF7ntjgBn1TzQgwh1uuIpDqdo8hgZx1/eiyKimKBwTx08CCLJNV1Av3QXRxQ9Bx1bC7gWTGUjZyZ10mclXsFma5B648auoV5R9+JJx/3xIfGTin5dkrJbC7yecpSAvv0hq3y86JGvdZbL+MeCDl4hTgiyY8zKe+BCVOGcXwFpCO0yanS6XkfRcAdwcM7fcqov3uqul+OXL+Zt6pLG0oVw5e+fgQe8qnF5p9GGA1PBEVDQV9PESeH1rzXXTNCcIYNyP7oYVf/n3petcmhWNisrUNzYj+1+hb2xTJbZge5te+TYGORx/o34y39ODQFdqodk7EvWtNGdwTTCMN852lgiq95vIW4eQYFeCoIL0/U9SUNf3TsYUlL2CHqeYWfHvaY+ui03fUWs09APjxRpITDjzE12xFZ8Xkmb9/6tVFMx3RB+gJAqw4SX4EkOBA0FJVSaSv2v7yY+ZNIUnQRaOUbaZfQR1JIuV4g== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2020 18:01:47.5049 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 92fcab73-83f6-4876-f8aa-08d7dd793cb6 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB5363 Subject: Re: [dpdk-dev] [PATCH v3 1/9] test/ring: add contention stress test 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" >=20 > > > > +static int > > > > +test_worker_prcs(void *arg) > > > > +{ > > > > + int32_t rc; > > > > + uint32_t lc, n, num; > > > minor, lcore instead of lc would be better > > > > > > > + uint64_t cl, tm0, tm1; > > > > + struct lcore_arg *la; > > > > + struct ring_elem def_elm, loc_elm; > > > > + struct ring_elem *obj[2 * BULK_NUM]; > > > > + > > > > + la =3D arg; > > > > + lc =3D rte_lcore_id(); > > > > + > > > > + fill_ring_elm(&def_elm, UINT32_MAX); > > > > + fill_ring_elm(&loc_elm, lc); > > > > + > > > > + while (wrk_cmd !=3D WRK_CMD_RUN) { > > > > + rte_smp_rmb(); > > > > + rte_pause(); > > > > + } > > > > + > > > > + cl =3D rte_rdtsc_precise(); > > > > + > > > > + do { > > > > + /* num in interval [7/8, 11/8] of BULK_NUM */ > > > > + num =3D 7 * BULK_NUM / 8 + rte_rand() % (BULK_NUM / 2); > > > > + > > > > + /* reset all pointer values */ > > > > + memset(obj, 0, sizeof(obj)); > > > > + > > > > + /* dequeue num elems */ > > > > + tm0 =3D rte_rdtsc_precise(); > > > > + n =3D _st_ring_dequeue_bulk(la->rng, (void **)obj, num, NULL); > > > > + tm0 =3D rte_rdtsc_precise() - tm0; > > > > + > > > > + /* check return value and objects */ > > > > + rc =3D check_ring_op(num, n, lc, __func__, > > > > + RTE_STR(_st_ring_dequeue_bulk)); > > > > + if (rc =3D=3D 0) > > > > + rc =3D check_updt_elem(obj, num, &def_elm, > > > > &loc_elm); > > > > + if (rc !=3D 0) > > > > + break; > > > Since this seems like a performance test, should we skip validating t= he > objects? >=20 > I think it is good to have test doing validation too. > It shouldn't affect measurements, but brings extra confidentiality that o= ur > ring implementation works properly and doesn't introduce any races. Ok, I am fine here as the cycles for validation are not counted in the cycl= es for ring APIs. IMO, this test is enough and do not need the average cycles test. >=20 > > > Did these tests run on Travis CI? >=20 > AFAIK, no but people can still run it manually. >=20 > >> I believe Travis CI has trouble running stress/performance tests if th= ey take > too much time. > > > The RTS and HTS tests should be added to functional tests. >=20 > Ok, I'll try to add some extra functional tests in v4.