mbox series

[0/7] support set thread name

Message ID 1618051221-19962-1-git-send-email-humin29@huawei.com (mailing list archive)
Headers
Series support set thread name |

Message

humin (Q) April 10, 2021, 10:40 a.m. UTC
  This set of patches support set thread name for debugging.

Chengwen Feng (7):
  net/ark: support set thread name
  net/ice: support set VSI reset thread name
  vdpa/ifc: support set notify and vring relay thread name
  raw/ifpga: support set monitor thread name
  examples/performance-thread: support set thread name
  telemetry: support set init threads name
  examples/vhost_blk: support set ctrl worker thread name

 drivers/net/ark/ark_ethdev.c                    |  1 +
 drivers/net/ice/ice_dcf_parent.c                |  5 +++++
 drivers/raw/ifpga/ifpga_rawdev.c                |  1 +
 drivers/vdpa/ifc/ifcvf_vdpa.c                   | 12 ++++++++++++
 examples/performance-thread/pthread_shim/main.c |  5 +++++
 examples/vhost_blk/vhost_blk.c                  |  1 +
 lib/librte_telemetry/telemetry.c                |  3 ++-
 7 files changed, 27 insertions(+), 1 deletion(-)
  

Comments

David Marchand April 12, 2021, 7:19 a.m. UTC | #1
On Sat, Apr 10, 2021 at 12:40 PM Min Hu (Connor) <humin29@huawei.com> wrote:
>
> This set of patches support set thread name for debugging.
>
> Chengwen Feng (7):
>   net/ark: support set thread name
>   net/ice: support set VSI reset thread name
>   vdpa/ifc: support set notify and vring relay thread name
>   raw/ifpga: support set monitor thread name
>   examples/performance-thread: support set thread name
>   telemetry: support set init threads name
>   examples/vhost_blk: support set ctrl worker thread name

Rather than add those calls, can maintainers check if their component
can use ctrl threads instead?
rte_ctrl_thread_create ensures both that the name is set, and that the
ctrl thread won't run on the same cpu as "datapath" threads.

I also saw some issues with components creating threads.
I'll post a series addressing those later (net/ark, net/ice not
detaching/joining created threads + telemetry not checking
pthread_create failures).
  
Power, Ciara April 12, 2021, 2:26 p.m. UTC | #2
>-----Original Message-----
>From: David Marchand <david.marchand@redhat.com>
>Sent: Monday 12 April 2021 08:20
>To: Min Hu (Connor) <humin29@huawei.com>; Shepard Siegel
><shepard.siegel@atomicrules.com>; Yang, Qiming <qiming.yang@intel.com>;
>Wang, Xiao W <xiao.w.wang@intel.com>; Xu, Rosen <rosen.xu@intel.com>;
>Maxime Coquelin <maxime.coquelin@redhat.com>
>Cc: dev <dev@dpdk.org>; Yigit, Ferruh <ferruh.yigit@intel.com>; Mcnamara,
>John <john.mcnamara@intel.com>; Power, Ciara <ciara.power@intel.com>
>Subject: Re: [dpdk-dev] [PATCH 0/7] support set thread name
>
>On Sat, Apr 10, 2021 at 12:40 PM Min Hu (Connor) <humin29@huawei.com>
>wrote:
>>
>> This set of patches support set thread name for debugging.
>>
>> Chengwen Feng (7):
>>   net/ark: support set thread name
>>   net/ice: support set VSI reset thread name
>>   vdpa/ifc: support set notify and vring relay thread name
>>   raw/ifpga: support set monitor thread name
>>   examples/performance-thread: support set thread name
>>   telemetry: support set init threads name
>>   examples/vhost_blk: support set ctrl worker thread name
>
>Rather than add those calls, can maintainers check if their component can use
>ctrl threads instead?
>rte_ctrl_thread_create ensures both that the name is set, and that the ctrl
>thread won't run on the same cpu as "datapath" threads.
>
>I also saw some issues with components creating threads.
>I'll post a series addressing those later (net/ark, net/ice not detaching/joining
>created threads + telemetry not checking pthread_create failures).
>
>

Hi David,

Telemetry has no dependency on EAL, so using the ctrl thread functions isn't possible for that component.

Thanks,
Ciara

>--
>David Marchand
  
humin (Q) April 13, 2021, 1:12 a.m. UTC | #3
在 2021/4/12 15:19, David Marchand 写道:
> On Sat, Apr 10, 2021 at 12:40 PM Min Hu (Connor) <humin29@huawei.com> wrote:
>>
>> This set of patches support set thread name for debugging.
>>
>> Chengwen Feng (7):
>>    net/ark: support set thread name
>>    net/ice: support set VSI reset thread name
>>    vdpa/ifc: support set notify and vring relay thread name
>>    raw/ifpga: support set monitor thread name
>>    examples/performance-thread: support set thread name
>>    telemetry: support set init threads name
>>    examples/vhost_blk: support set ctrl worker thread name
> 
> Rather than add those calls, can maintainers check if their component
> can use ctrl threads instead?
> rte_ctrl_thread_create ensures both that the name is set, and that the
> ctrl thread won't run on the same cpu as "datapath" threads.
> 
> I also saw some issues with components creating threads.
> I'll post a series addressing those later (net/ark, net/ice not
> detaching/joining created threads + telemetry not checking
> pthread_create failures).
> 
  Totally agree with David.
By the way, for "telemetry not checking pthread_create failures", I have
sent patches to fix it. Please check it out.
	Thanks.
>
  
fengchengwen April 13, 2021, 1:20 a.m. UTC | #4
On 2021/4/12 15:19, David Marchand wrote:
> On Sat, Apr 10, 2021 at 12:40 PM Min Hu (Connor) <humin29@huawei.com> wrote:
>>
>> This set of patches support set thread name for debugging.
>>
>> Chengwen Feng (7):
>>   net/ark: support set thread name
>>   net/ice: support set VSI reset thread name
>>   vdpa/ifc: support set notify and vring relay thread name
>>   raw/ifpga: support set monitor thread name
>>   examples/performance-thread: support set thread name
>>   telemetry: support set init threads name
>>   examples/vhost_blk: support set ctrl worker thread name
> 
> Rather than add those calls, can maintainers check if their component
> can use ctrl threads instead?
> rte_ctrl_thread_create ensures both that the name is set, and that the
> ctrl thread won't run on the same cpu as "datapath" threads.
> 
> I also saw some issues with components creating threads.
> I'll post a series addressing those later (net/ark, net/ice not
> detaching/joining created threads + telemetry not checking
> pthread_create failures).
> 
> 

There already have reviewing patches:
([dpdk-dev] [PATCH v2 0/2] fix missing check for thread creation)
to fix telemetry not checking pthread_create failure.

Please review it, thanks
  
Thomas Monjalon April 16, 2021, 6:40 p.m. UTC | #5
13/04/2021 03:12, Min Hu (Connor):
> 在 2021/4/12 15:19, David Marchand 写道:
> > On Sat, Apr 10, 2021 at 12:40 PM Min Hu (Connor) <humin29@huawei.com> wrote:
> >>
> >> This set of patches support set thread name for debugging.
> >>
> >> Chengwen Feng (7):
> >>    net/ark: support set thread name
> >>    net/ice: support set VSI reset thread name
> >>    vdpa/ifc: support set notify and vring relay thread name
> >>    raw/ifpga: support set monitor thread name
> >>    examples/performance-thread: support set thread name
> >>    telemetry: support set init threads name
> >>    examples/vhost_blk: support set ctrl worker thread name
> > 
> > Rather than add those calls, can maintainers check if their component
> > can use ctrl threads instead?
> > rte_ctrl_thread_create ensures both that the name is set, and that the
> > ctrl thread won't run on the same cpu as "datapath" threads.
> > 
> > I also saw some issues with components creating threads.
> > I'll post a series addressing those later (net/ark, net/ice not
> > detaching/joining created threads + telemetry not checking
> > pthread_create failures).
> > 
>   Totally agree with David.
> By the way, for "telemetry not checking pthread_create failures", I have
> sent patches to fix it. Please check it out.
> 	Thanks.

Do I understand correctly that we prefer switching
to rte_ctrl_thread_create() instead of this patch series
adding rte_thread_setname()?

Any volunteer to add the use of rte_ctrl_thread_create()
in these drivers and examples?
  
humin (Q) April 17, 2021, 6:15 a.m. UTC | #6
在 2021/4/17 2:40, Thomas Monjalon 写道:
> 13/04/2021 03:12, Min Hu (Connor):
>> 在 2021/4/12 15:19, David Marchand 写道:
>>> On Sat, Apr 10, 2021 at 12:40 PM Min Hu (Connor) <humin29@huawei.com> wrote:
>>>>
>>>> This set of patches support set thread name for debugging.
>>>>
>>>> Chengwen Feng (7):
>>>>     net/ark: support set thread name
>>>>     net/ice: support set VSI reset thread name
>>>>     vdpa/ifc: support set notify and vring relay thread name
>>>>     raw/ifpga: support set monitor thread name
>>>>     examples/performance-thread: support set thread name
>>>>     telemetry: support set init threads name
>>>>     examples/vhost_blk: support set ctrl worker thread name
>>>
>>> Rather than add those calls, can maintainers check if their component
>>> can use ctrl threads instead?
>>> rte_ctrl_thread_create ensures both that the name is set, and that the
>>> ctrl thread won't run on the same cpu as "datapath" threads.
>>>
>>> I also saw some issues with components creating threads.
>>> I'll post a series addressing those later (net/ark, net/ice not
>>> detaching/joining created threads + telemetry not checking
>>> pthread_create failures).
>>>
>>    Totally agree with David.
>> By the way, for "telemetry not checking pthread_create failures", I have
>> sent patches to fix it. Please check it out.
>> 	Thanks.
> 
> Do I understand correctly that we prefer switching
> to rte_ctrl_thread_create() instead of this patch series
> adding rte_thread_setname()?
> 
> Any volunteer to add the use of rte_ctrl_thread_create()
> in these drivers and examples?
> 
Hi, Thomos, we will send next patch to fix it, thanks.
> 
> .
>