From: Tyler Retzlaff <roretzla@linux.microsoft.com>
To: Michael Pfeiffer <michael.pfeiffer@tu-ilmenau.de>
Cc: Stephen Hemminger <stephen@networkplumber.org>,
David Marchand <david.marchand@redhat.com>,
Markus Theil <markus.theil@tu-ilmenau.de>,
dev@dpdk.org
Subject: Re: [PATCH v2 1/2] eal: expose lcore pthread id
Date: Tue, 29 Nov 2022 14:04:45 -0800 [thread overview]
Message-ID: <20221129220445.GB31725@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> (raw)
In-Reply-To: <c101067e3008f753e124cfe3c89576576bcce97d.camel@tu-ilmenau.de>
On Thu, Oct 20, 2022 at 10:03:01PM +0200, Michael Pfeiffer wrote:
> On Thu, 2022-10-20 at 08:36 -0700, Stephen Hemminger wrote:
> > On Thu, 20 Oct 2022 13:20:40 +0200
> > David Marchand <david.marchand@redhat.com> wrote:
> >
> > > On Fri, Oct 14, 2022 at 9:54 AM Markus Theil <markus.theil@tu-ilmenau.de>
> > > wrote:
> > > >
> > > > From: Michael Pfeiffer <michael.pfeiffer@tu-ilmenau.de>
> > > >
> > > > Also expose the pthread id of each lcore, in
> > > > order to allow modification of pthread attributes,
> > > > for example use rte_thread_setname without executing
> > > > pthread_self() on the maybe already running lcore.
> > > >
> > > > The rte_lcore_to_thread_id function is added to API.
> > > >
> > > > Signed-off-by: Michael Pfeiffer <michael.pfeiffer@tu-ilmenau.de>
> > >
> > > We are trying to abstract the use of pthread in DPDK API.
> > > So I don't think this patch is going in the right direction.
> >
> > Agree, exposing this will make Windows support harder
> > and who knows what next OS to come will need.
>
> Hi,
> thanks for your feedback. I understand your concerns regarding abstraction and
> portability.
>
> Markus and I ultimately use the function in the patch to call
> rte_thread_setname() (which takes the pthread id as an argument) to rename our
> lcore workers from "lcore-worker-X" to something more meaningful in the scope
> of our application. Having descriptive thread names makes debugging
> significantly easier. For example, verifying CPU pinning worked as intended
> with ps -T ..., or identifying threads in the Intel VTune profiler.
>
> Would you consider something like
> - int rte_lcore_setname(unsigned int lcore_id, const char *name)
> - int rte_lcore_getname(unsigned int lcore_id, char *name, size_t len)
> a more appropriate API? That would still allow us to set names from the main
> lcore, but would not expose any pthread internals.
if only setname, getname are needed for rte_thread_t i imagine it
shouldn't be too objectionable to add them to rte_thread.h
you can either wait until i have time to do it (could be a while) or you
can put a new patch + unit test together.
if testing the windows implementation part of the addition is a barrier
i can apply and run the supplied unit test, assist with review.
>
> Thanks & regards
> Michael
next prev parent reply other threads:[~2022-11-29 22:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-14 6:20 [PATCH " Markus Theil
2022-10-14 6:21 ` [PATCH 2/2] eal: prevent OOB read in rte_lcore_to_socket_id Markus Theil
2022-10-14 7:54 ` [PATCH v2 1/2] eal: expose lcore pthread id Markus Theil
2022-10-14 7:54 ` [PATCH v2 2/2] eal: prevent OOB read in rte_lcore_to_socket_id Markus Theil
2022-10-20 11:20 ` [PATCH v2 1/2] eal: expose lcore pthread id David Marchand
2022-10-20 15:36 ` Stephen Hemminger
2022-10-20 20:03 ` Michael Pfeiffer
2022-11-29 22:04 ` Tyler Retzlaff [this message]
2023-07-06 2:57 ` Stephen Hemminger
2023-07-06 5:50 ` Michael Pfeiffer
2022-11-12 0:34 ` Tyler Retzlaff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221129220445.GB31725@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net \
--to=roretzla@linux.microsoft.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=markus.theil@tu-ilmenau.de \
--cc=michael.pfeiffer@tu-ilmenau.de \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).