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 8E21BA051F; Wed, 10 Jun 2020 16:45:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DFD701BF86; Wed, 10 Jun 2020 16:45:23 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id C731B1BF80 for ; Wed, 10 Jun 2020 16:45:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591800322; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gtf8GQQiQ5cI5mgUJdR5XtYW9/tJCCFhUVfXzp6k6f0=; b=XrId+geoy/gbAGfdL4QPEvHzf2R6qZa4D4yuWOGoef0kjV4Y6SfqWhQaUQCNAjH/0W2skj jaOSqww3JZJDjrmEAznkNYOHKnrSwhfo/8gi0KWAmYn5CfpPrR2i8+xIMRmjXMIXIycbDB mxJ2Pb1e19ZhtQK9McMLUJmOs3l6sYc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-209-GYIoE3-ZMrSv-cPEb0Efng-1; Wed, 10 Jun 2020 10:45:19 -0400 X-MC-Unique: GYIoE3-ZMrSv-cPEb0Efng-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8FA39800053 for ; Wed, 10 Jun 2020 14:45:18 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.192.116]) by smtp.corp.redhat.com (Postfix) with ESMTP id EACE060E3E for ; Wed, 10 Jun 2020 14:45:17 +0000 (UTC) From: David Marchand To: dev@dpdk.org Date: Wed, 10 Jun 2020 16:44:59 +0200 Message-Id: <20200610144506.30505-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 0/7] Register external threads as lcore 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" OVS and some other applications have been hacking into DPDK internals to fake EAL threads and avoid performance penalty of only having non-EAL threads. This series proposes to add a new type of lcores and maps those external threads to such lcores. Those threads won't run the DPDK eal mainloop and as a consequence part of the EAL threads API cannot work. Having new lcores appearing during the process lifetime is not expected by some DPDK components. This is addressed by notifying of such lcore hotplug. This patchset has still some more work (like refusing new lcore type in incompatible EAL threads API, updating the documentation and adding unit tests) but I am sending it anyway as I would like to get this in for 20.08. For the interested parties, I have a patch [1] against dpdk-latest OVS branch that makes use of this series. 1: https://github.com/david-marchand/ovs/commit/dpdk-latest-external-lcores -- David Marchand David Marchand (7): eal: relocate per thread symbols to common eal: fix multiple definition of per lcore thread id eal: introduce thread init helper eal: introduce thread uninit helper eal: register non-EAL threads as lcore eal: dump lcores eal: add lcore hotplug notifications doc/guides/howto/debug_troubleshoot.rst | 5 +- lib/librte_eal/common/eal_common_lcore.c | 167 +++++++++++++++++++++- lib/librte_eal/common/eal_common_thread.c | 143 ++++++++++++++---- lib/librte_eal/common/eal_common_trace.c | 49 ++++++- lib/librte_eal/common/eal_private.h | 43 ++++++ lib/librte_eal/common/eal_thread.h | 26 +++- lib/librte_eal/common/eal_trace.h | 1 + lib/librte_eal/freebsd/eal.c | 16 ++- lib/librte_eal/freebsd/eal_thread.c | 38 +---- lib/librte_eal/include/rte_eal.h | 12 +- lib/librte_eal/include/rte_lcore.h | 112 +++++++++++++-- lib/librte_eal/linux/eal.c | 17 ++- lib/librte_eal/linux/eal_thread.c | 38 +---- lib/librte_eal/rte_eal_version.map | 14 ++ lib/librte_eal/windows/eal.c | 3 +- lib/librte_eal/windows/eal_thread.c | 14 +- 16 files changed, 536 insertions(+), 162 deletions(-) -- 2.23.0