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 3CF3643402; Wed, 29 Nov 2023 16:52:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B5522409FA; Wed, 29 Nov 2023 16:52:40 +0100 (CET) Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by mails.dpdk.org (Postfix) with ESMTP id 5855D402CE for ; Wed, 29 Nov 2023 16:52:39 +0100 (CET) Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-1cfc2d03b3aso29830545ad.1 for ; Wed, 29 Nov 2023 07:52:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1701273158; x=1701877958; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=JgnQadJz8cmyZjh3EopP0yF+/RilkGlvOnDP7mPa3UM=; b=xXDq3Dsl0JNTcYgpyvbvQOKLfWaSFNVaC1E1IkU3lDgfghQReDJFJvcYZTr65zJnEx Yq8P/mMPG5DSQfnYSluhdXgpcI4RYvHaw0YCVWT23gZIOqSaJd7kZvpJmAWXK3gHK1x6 xUHpoq5we1lk/V2o9jNZLLZ+KsvZmfQJqJG1iBHQua4SYtAJ7dY+soFLrMFdKF2aTj1l CnbYfgzccibkFLxtpCj7qzoOqo0pjouIKyBENitcK8ObHk33OB5ruNqjQn0HL2jFRmwT 2wIrn3nPAm9UyIGXhtLa+cu5BbpWSo6L0OTiR1eTT2RylPD8IYoAKW2Zf4SDuEn3WnRV pzmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701273158; x=1701877958; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JgnQadJz8cmyZjh3EopP0yF+/RilkGlvOnDP7mPa3UM=; b=GKDlv53IVGy7tTVWhILcXnXZY916QegVqFMXsULBq0oxQg7QlO8Ly/ONx+uJMokIHG lKcFTJ2p054bYx2ZtGArsZOuAMzKw3khwVeJpETFtcYLPBtTz6/rG/1lOJ55upc8m+2L m+2bJ0W0J3VRKjnMF9M6Fm97PNJoxOhby4RjjMfKt53zxkOubMdVeXK8tCGnde80I7++ wpXR2S+vj2bb9zOotOz3JjncpMFyDeoIpQlmifU9YOuBn2up0/yHg5gE5AduMmg8uFoP IsJNCQ8A69zkb+gH6nEPnPFVwKJnzlRdG7a9NDgeC1yHWIewavDRKno2EAdRuxg9A9rD 4nfw== X-Gm-Message-State: AOJu0YyFxO9kBRu4I9SZH7wqmNM6Umr8QHzlYJNgDLhDBhISmPk1X7/8 UBwDuZ3Zwtuby551DkzlrWYTag== X-Google-Smtp-Source: AGHT+IHaP//c/GSmcJOPNmfsWK5S5bS02DaASLPIoafMo/SpdfPOuaPbfWONFK7oArbB8DkGdR10og== X-Received: by 2002:a17:903:2311:b0:1cc:32df:8eb5 with SMTP id d17-20020a170903231100b001cc32df8eb5mr21609512plh.6.1701273158334; Wed, 29 Nov 2023 07:52:38 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id i1-20020a170902c28100b001c739768214sm12548337pld.92.2023.11.29.07.52.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 07:52:38 -0800 (PST) Date: Wed, 29 Nov 2023 07:52:36 -0800 From: Stephen Hemminger To: David Vodak Cc: Tyler Retzlaff , dev@dpdk.org Subject: Re: [PATCH] eal: introduce missing rte_thread wrappers Message-ID: <20231129075236.1e0a69a2@hermes.local> In-Reply-To: References: <20231127092502.18510-1-vodak@cesnet.cz> <20231127172722.GA14975@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Tue, 28 Nov 2023 09:54:02 +0100 David Vodak wrote: > On 11/27/23 18:27, Tyler Retzlaff wrote: > > > On Mon, Nov 27, 2023 at 10:25:02AM +0100, David Vodak wrote: > >> Function rte_ctrl_thread_create has been replaced by rte_thread_create_control, > >> encouraging Linux users to switch from the pthread_t API to the rte_thread API. > >> However the rte_thread API does not provide wrappers for all pthread functions. > >> This commit introduces equivalent functions for pthread_timedjoin_np, > >> pthread_getname_np and pthread_cancel. > >> > >> Bugzilla ID: 1330 > >> --- > > NAK this series. the rte thread API is not a POSIX emulation API. > > > > the point of EAL is not to require applications to have to conditionally > > compile code around the use of EAL API or handle "not supported" > > failures it defeats the purpose of being an abstraction library. > Hi, > > I understand that these changes may not be the best alternative. But > what other options do we have, > if we are already using functions such as pthread_timedjoin_np? Should > we just keep using them and > treat rte_thread_id.opaque_id as pthread_t? For performance and initial isolated core model, DPDK was initially designed with a specific thread model using dedicated threads. Over time the thread model has grown a little more flexible with rte_ctrl threads and service lcores. But DPDK is not a generalized OS thread model wrapper. The problem is that DPDK API's need to make some assumptions about being able to be not preempted and not having locking. If you allow all of pthreads that will break. If you want to design an application with a different thread model, then do not expect the rest of DPDK to work. The burden of support and testing needs to be shifted back to this application.