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 4A6E9A0579; Wed, 7 Apr 2021 17:09:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 34DDD140F6C; Wed, 7 Apr 2021 17:09:57 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 9C0F2406A3 for ; Wed, 7 Apr 2021 17:09:55 +0200 (CEST) IronPort-SDR: DIzNQ8QLsPguW1zz0e7M7UOjl80LY7f1RU8UIupA/mevFIAjxd5Cal75K0yOW70OWLK7eVPbWp y/cLXLzOXT4w== X-IronPort-AV: E=McAfee;i="6000,8403,9947"; a="278593525" X-IronPort-AV: E=Sophos;i="5.82,203,1613462400"; d="scan'208";a="278593525" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2021 08:09:43 -0700 IronPort-SDR: L/swPZRkFd+FhlqTEJyf38shYwhTL9vczWYIIa2dTxJ48rc6ysc988+NKNEgEa087Fbu3oOG3i 0zNl+Z09aSOA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,203,1613462400"; d="scan'208";a="421739680" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by orsmga008.jf.intel.com with ESMTP; 07 Apr 2021 08:09:42 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) 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.2106.2; Wed, 7 Apr 2021 08:09:41 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Wed, 7 Apr 2021 08:09:40 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) 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.2106.2 via Frontend Transport; Wed, 7 Apr 2021 08:09:40 -0700 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (104.47.37.58) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2106.2; Wed, 7 Apr 2021 08:09:40 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XVgdtp9V6RNyejCuryedL55FbY4fvlkaeNd8Jb/1edJ+nT458fPY7Ad5AJ9b13aIlJHiVKyV+ZwPOqzstZBzoj7NeggipAd9gyF+EVNAk3jQ7H7pxl3YW5wJfltIDJG/zubp6RR2DE3zcPn9DTZmxd+xrGwe0psBaEqUIwGNz5XTPjlHWi8cNmInrr6gVY05bGYokaUzvAVuv3v0mdJC700yKFbSrIMgiPwenjobPMwx6n3Q7YBluu2clJ+4eZfcx8YzFE57cmZkgSeQ0gjw17t0g3Kqa7taGQ94S99gJqRgtWzUtAG+aXfPDgr0H50+jOnG62iWJi9CPJZnV4RGBw== 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=dzQJFK9oE1nm6wilOxau2wO1s02LrwUDRXIr5/44Mq8=; b=h9uzNTvmJUXpZTKswj55LyFpp2Z7PF+yzq+1ifvUPvZ27/VGXV7XVnC6yagProCdTs3pN+D98agcugKpIY6q32OIitCgd+XGIImT716dNzfBpqmcGyhbo9ScU6t5+C3tJytYh6+D9b1b92a44SY8bz80RWbKnXyflYFNFST5VEJKktG7gqNcV2AbMb/tPznvHqYXauK5KUxrsMNqAkqB2WLv548+IH0sM86UkqfWaIgZoP7Q0A3Yr3X3TooFZL4Ev0IyKw+1h8PYzHCs4zYDaTGwBGcvIs0TDdwNZ5K+S+PfS++/mT4epyOV/FDN6hLMUdi4YLN2bn4u56z2tCjudA== 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=dzQJFK9oE1nm6wilOxau2wO1s02LrwUDRXIr5/44Mq8=; b=abD7eH5d7HE2myhFj6cKfCQ9hIODxJbkNcJHFIKQ5l2VI0rnmmMg5dweSSrIpl2cG7cLuL3mjUfuJwIXKalL6Br6ZOYO9KwiFAuUW3K/ygVxhMO4prN/QyiEdsY4UIZE0HFGz6voZ8TanfYHGsBui3IaVscMtSvxIKokPi9o5xU= Received: from DM6PR11MB4491.namprd11.prod.outlook.com (2603:10b6:5:204::19) by DM6PR11MB2636.namprd11.prod.outlook.com (2603:10b6:5:c8::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.29; Wed, 7 Apr 2021 15:09:39 +0000 Received: from DM6PR11MB4491.namprd11.prod.outlook.com ([fe80::3182:6da2:8c64:f07a]) by DM6PR11MB4491.namprd11.prod.outlook.com ([fe80::3182:6da2:8c64:f07a%3]) with mapi id 15.20.3999.032; Wed, 7 Apr 2021 15:09:39 +0000 From: "Ananyev, Konstantin" To: Stephen Hemminger , "dev@dpdk.org" , Honnappa Nagarahalli Thread-Topic: [dpdk-dev] [PATCH v5] pflock: implementation of phase-fair reader writer locks Thread-Index: AQHXJ2GX/rjTAClzCEKWSfRldy/9a6qpMNyA Date: Wed, 7 Apr 2021 15:09:39 +0000 Message-ID: References: <20210212013838.312623-1-sthemmin@microsoft.com> <20210402014247.196702-1-stephen@networkplumber.org> In-Reply-To: <20210402014247.196702-1-stephen@networkplumber.org> Accept-Language: en-GB, 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.5.1.3 authentication-results: networkplumber.org; dkim=none (message not signed) header.d=none;networkplumber.org; dmarc=none action=none header.from=intel.com; x-originating-ip: [109.255.184.192] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3dc422d8-0f24-429e-1eeb-08d8f9d72a43 x-ms-traffictypediagnostic: DM6PR11MB2636: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2331; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 08oiS/q7uElgvzVM2smryvLHm2HKblYhL/CLJfhjLahH/EgfhTH16NrVtbg/1DHP41q12XhahoJy11AbAmuwJBFakI0IizR9OVkDmHV5/eOckSr+OBub51cj5fJn0eAJltXyx/8kj1iiX/PBc6Aywh38oYNUyTAdLQs4bMPKrecO/ouqhKHB730xBLRdwOBoTe9MJt8S3SXMLjOTXwA4iGUqHkGxa8YaKR2E4BeLWnEHqqmjLoj1txyPbp5nBcZd1PXsYS0KIXx2yfmrKu0HuMM0GClnW9yKKyRwNTg09b3C9V8WX6V1M6F/Ugd2S5RPlENgOp/EmuZoLD0e/Rf0pGoaW67TPw+Qfj5utJOLlZvuvwpedjjuAQIlocFpdCo4TfFgkQmYbWl6AYC0F6X16bfQfaOt8hmf5QJWqkDLq5NO3EXdmr0gIDmAlqGfwA+L+75cp5B/J5ownXsrOWJJ/Cl6Ua7qOF6JnAyxAsowR27aVnoo9sas2adM67DWWpmqQEjbfVaJRbkr2XZC5EUbq6jqP6DjbTgKZiO4+bk1S8xqf9xuA7EV4PWaReBHzkWThU0XMvLz8qUdlh9rAJP9zF+WFNVDOf2TIMSgt0KSHmNEIE9S0NwMl/UunmpsKsBus8gMN6/j+HqS7r7WeGhMARqVDpynktaD5UMsp3YS62N+GWL+gCXYjPR8efwHx3fYnnGZQwMzqTP7mShVVcjnmFXvGlNU7cQl0IteciveBAcCRxVK7nclZsTslM+ZNasn x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB4491.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(8936002)(2906002)(8676002)(52536014)(86362001)(26005)(7696005)(498600001)(64756008)(110136005)(66946007)(66476007)(66556008)(38100700001)(966005)(33656002)(53546011)(71200400001)(76116006)(186003)(66446008)(55236004)(6506007)(5660300002)(9686003)(55016002)(83380400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?T4mYDkHV6PvYTFNzKRaHhPCx5dECkzAuPMaGGk+nQyxoK3rE5BaqnKeHCJNt?= =?us-ascii?Q?+5//pqqW8jD3xcWfwufcBLimp7IGKUzlBTw/oZHEgSHNf+Qt85Br+lTClx9f?= =?us-ascii?Q?LiVK/iLh61lJRffjGEOb4lxNzYDT3Eu4eJlGgU8T5vtfk0Bx9R9ee0UaHGXz?= =?us-ascii?Q?HazkTXnPbHIf8BnpCgUPOLc/4qJkoQ9tDPnVjR7ry8481R8P1z7nFM8P7B7C?= =?us-ascii?Q?Finx2YXXrLs2iSkYaqLhYFyZ7nDfMZepA/Uj49uZPHKUbmYT/WuEI7MG/cTH?= =?us-ascii?Q?iNQdsJibCI5gR2bDOGO+LcsrvWT63aX0Hko6VeWvbcjuMXBAxrsuL79yRlqj?= =?us-ascii?Q?aQx6GY5lOmMkyrX5zuYyoPN5Kkn9g8M+ODy8KQQ8cipcIGNiVNxmhTuzenmK?= =?us-ascii?Q?M+bCBknbNWitQ/km8k8fi4aRh2EYd/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29vXQdJ1frhDn?= 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-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4491.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3dc422d8-0f24-429e-1eeb-08d8f9d72a43 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Apr 2021 15:09:39.4462 (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: qe993Y0gjAOKy3oJdznKTLQlJ4qrGP6ASpQiKajxlsEUSO8otsqoOM1HwBceuKtGMFd18IkLm2VXzS0Iw8r3epkEXXXOkBDz2dOlb4J0GbQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB2636 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v5] pflock: implementation of phase-fair reader writer locks 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 Sender: "dev" > -----Original Message----- > From: dev On Behalf Of Stephen Hemminger > Sent: Friday, April 2, 2021 2:43 AM > To: dev@dpdk.org; Honnappa Nagarahalli > Cc: Stephen Hemminger > Subject: [dpdk-dev] [PATCH v5] pflock: implementation of phase-fair reade= r writer locks >=20 > This is a new type of reader-writer lock that provides better fairness > guarantees which better suited for typical DPDK applications. > A pflock has two ticket pools, one for readers and one > for writers. >=20 > Phase fair reader writer locks ensure that neither reader nor writer will= be > starved. Neither reader or writer are preferred, they execute in > alternating phases. All operations of the same type (reader or writer) > that acquire the lock are handled in FIFO order. Write > operations are exclusive, and multiple read operations can be run > together (until a write arrives). >=20 > A similar implementation is in Concurrency Kit package in FreeBSD. > For more information see: > "Reader-Writer Synchronization for Shared-Memory Multiprocessor > Real-Time Systems", > http://www.cs.unc.edu/~anderson/papers/ecrts09b.pdf >=20 > Signed-off-by: Stephen Hemminger > --- Acked-by: Konstantin Ananyev > 2.30.2