DPDK patches and discussions
 help / color / mirror / Atom feed
From: Matthew Hall <mhall@mhcomputing.net>
To: "Liang, Cunming" <cunming.liang@intel.com>
Cc: thomas.monjalon@6wind.com, dev@dpdk.org
Subject: Re: [dpdk-dev] [dpdk-dev, 1/3] rte_interrupts: add rte_eal_intr_exit to shut down IRQ thread
Date: Tue, 22 Mar 2016 00:39:21 -0700	[thread overview]
Message-ID: <20160322073921.GA28285@mhcomputing.net> (raw)
In-Reply-To: <56EFA9B4.9080404@intel.com>

On Mon, Mar 21, 2016 at 03:58:44PM +0800, Liang, Cunming wrote:
> the default termination handler

I am not so experienced with this "default termination handler". Can someone 
clarify what it is so I could comment better about it?

> If EINTR is caused by some non-term purpose signals, are you going
> to exit the interrupt thread any way?

We should discuss what makes sense here. I'm just trying to get some things 
working and finding EINTR was getting eaten and causing infinite looping.

> Without setting 'PTHREAD_CREATE_DETACHED' won't cause the infinite
> loop. However by using pthread_cancel to terminate the thread,
> indeed it's necessary to set 'PTHREAD_CREATE_DETACHED'.

My general understanding is that PTHREAD_CREATE_DETACHED should be used for 
any thread, which should not keep a process open by itself if it is executing, 
i.e. a "daemon thread". I believe the interrupt thread qualifies as such a 
thread if I have understood everything right (which is hard to promise when 
you only work in DPDK in spare time).

> It looks like 'pthread_cancel' is the right way and I saw it
> continue keeps current EINTR handling in EAL interrupt thread.

It is one option. Depending what makes the most sense.

> 1. Can you explain and add patch comments why default signal handler
> is not good enough to terminate app.

Yes if someone call tell me more about what it is so I can check it.

> 2. I propose to add addition comments on rte_epoll_wait() API
> description. For any signal, it causes an error return, user needs
> to handle.

Agreed.

> 3. Will you do a favorite to add 'PTHREAD_CREATE_DETACHED' to all
> EAL pthread too.

As a spare time developer I am a bit conservative about too large of a scope 
and messing with code for other threads or features I didn't personally use or 
test. This is because I don't have the same QA resources as Intel / 6WIND / 
etc.. Some help from a full time developer would be great here.

> Cunming

Matthew.

  reply	other threads:[~2016-03-22  7:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-13 21:38 [dpdk-dev] [PATCH " Matthew Hall
2016-02-13 21:38 ` [dpdk-dev] [PATCH 2/3] eal_interrupts: mark EAL interrupt thread as a daemon thread Matthew Hall
2016-02-13 21:38 ` [dpdk-dev] [PATCH 3/3] rte_epoll_wait: allow EINTR to be passed to caller Matthew Hall
2016-02-28 21:17 ` [dpdk-dev] [PATCH 1/3] rte_interrupts: add rte_eal_intr_exit to shut down IRQ thread Thomas Monjalon
2016-03-08 15:09   ` Thomas Monjalon
2016-03-09  9:05 ` Liang, Cunming
2016-03-17 22:55 ` [dpdk-dev] [dpdk-dev, " Matthew Hall
2016-03-21  7:58   ` Liang, Cunming
2016-03-22  7:39     ` Matthew Hall [this message]
2016-03-23  3:24       ` Liang, Cunming
2016-07-08 17:36         ` Thomas Monjalon
2016-07-11  4:07           ` Liang, Cunming
2020-08-13 22:28 Bly, Mike

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=20160322073921.GA28285@mhcomputing.net \
    --to=mhall@mhcomputing.net \
    --cc=cunming.liang@intel.com \
    --cc=dev@dpdk.org \
    --cc=thomas.monjalon@6wind.com \
    /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).