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 1D19AA051F; Wed, 10 Jun 2020 17:09:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id ACDE31BEA3; Wed, 10 Jun 2020 17:09:48 +0200 (CEST) Received: from mail-il1-f194.google.com (mail-il1-f194.google.com [209.85.166.194]) by dpdk.org (Postfix) with ESMTP id BA9A11BE98 for ; Wed, 10 Jun 2020 17:09:47 +0200 (CEST) Received: by mail-il1-f194.google.com with SMTP id h3so2201207ilh.13 for ; Wed, 10 Jun 2020 08:09:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GkOJnR0nuFNrX9G3GVCA7+7JagcTBDsZlUQncglb3W8=; b=cllMbAmSJAPgeYVxe6uC7+dd+q0B7H4D4VkeCRClCI/Qb1KR9Lb5BItKI3iIZIvlnR QBjSC06W+4yYM22i6b9osNh1loovxUvlrUYGyS/NPk6/OjSc8vcC23SsiD50ka3CFbqM 2Nd2pheRhnskflp/WI2lT7OUmyxz/6vMDabbqQwZj3jZjJ9OLfikhKfjm3QXKwwvc5JG ajMRxOvrf8958dyU+ciu+pyZ0YJLJIPSBqDGm7ocR7vR9V2FewqoRdk/m6QYTO/x7I3f Lzg4GpY43EBiJEldmRf5xygEn/JtJ48Hd6cZ/TsCkdif9fhrbt4rV27y6ZeGSg0/OfpJ rjYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GkOJnR0nuFNrX9G3GVCA7+7JagcTBDsZlUQncglb3W8=; b=A3O3NR6AyqI9G/qVxAmNtUjTD4OPc5qUsRpeWlXZ8ZmR/ZO2HYv3zeg8nJt/LZAqqh QkFWrHVu9Y+CQVQN3+pRWmUd+hPQ7DRgjPe+Swo8oInqdFykr+vkhJBOGC1IsZU2QgUs 2+6BjqPh9OFf6XMS95r5e5zwiB2CU1DMlt9aYChufz7XGg1XkuTUH38tPzJgRHKhiZqH Ufw5jgL1/YyxwpJJQBBm5JawOeO0Mq94elaTwyFAJfrvj+bMYDqMr6dA/n9Anp5QwiBE 5DwMYbrEOOTP+rthp5RT4ZvbKowRkSg/aSt52m3Immh0y4NwVf6kFyxB+kzS+mS6sdUf +10A== X-Gm-Message-State: AOAM5323y9+llpwpIpn1k8LppQlWFcZ7MUfMkrS1KNqnKuuaildg+84u 8JmsLscPA8KRrU2Pf6Sxa18+D34RUknD/p+lA+o= X-Google-Smtp-Source: ABdhPJwDQV/yuW0reeXCvZZwol3DZVEnxA3kpYvuHToYyk92sGCTElay84h2JZe/3x7VtDtjn5QRWr35Woln6yaqRes= X-Received: by 2002:a05:6e02:972:: with SMTP id q18mr3278175ilt.60.1591801786978; Wed, 10 Jun 2020 08:09:46 -0700 (PDT) MIME-Version: 1.0 References: <20200610144506.30505-1-david.marchand@redhat.com> In-Reply-To: <20200610144506.30505-1-david.marchand@redhat.com> From: Jerin Jacob Date: Wed, 10 Jun 2020 20:39:30 +0530 Message-ID: To: David Marchand Cc: dpdk-dev Content-Type: text/plain; charset="UTF-8" Subject: Re: [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" On Wed, Jun 10, 2020 at 8:15 PM David Marchand wrote: > > 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. Cool feature. Is mempool's lcore local cache working for external cores with this scheme? > > 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 Usage is clear from the example code, Looking forward to having documentation and UT for the new API in the next version. > > -- > 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 >