linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Davda, Bhavesh P \(Bhavesh\)" <bhavesh@avaya.com>
To: "Daniel Jacobowitz" <dan@debian.org>
Cc: <linux-kernel@vger.kernel.org>
Subject: RE: [RFC PATCH] New SA_NOPRNOTIF sigaction flag
Date: Tue, 27 Sep 2005 15:55:26 -0600	[thread overview]
Message-ID: <21FFE0795C0F654FAD783094A9AE1DFC086EFEEB@cof110avexu4.global.avaya.com> (raw)

> -----Original Message-----
> From: Daniel Jacobowitz [mailto:dan@debian.org] 
> Sent: Tuesday, September 27, 2005 2:39 PM
> To: Davda, Bhavesh P (Bhavesh)
> Cc: linux-kernel@vger.kernel.org
> Subject: Re: [RFC PATCH] New SA_NOPRNOTIF sigaction flag
> 
> On Tue, Sep 27, 2005 at 10:24:23AM -0600, Davda, Bhavesh P 
> (Bhavesh) wrote:
> > About the priority inversion and running the debugger at 
> higher priority
> > then the debuggee, that's a moot point. You're still doing too many
> > pointless context switches to the debugger only to do 
> nothing and switch
> > back to the debuggee.
> 
> Depending on your debugger, they may not be pointless.


Sorry for reiterating this, but in certain cases, yes, the context
switch to the debugger just to have it ignore the SIGCHLD for that
signal is pointless.


> > Besides, putting this responsibility (ignore SIGCHLDs for 
> signal X from
> > Task Y) in the debugger requires the debugger to have 
> information about
> > the debuggee, like Task Y is special for handling signal X, and I'm
> > going to ptrace() ignore SIGCHLD's from Task Y.
> > 
> > See where I'm going with this?
> 
> Hint: your debugger already needs to know this.  GDB already does.  It
> has a list of signals not to bother stopping or displaying to 
> the user.
> SIGCHLD is on it by default.  If not, you'd see the debugger prompt
> after each one of these context switches.
> 

That is under user control of the person using the debugger. What I was
talking about is control in the debuggee process/developer to say that I
would like to spare the unnecessary overhead of notifying the debugger
that a specific signal is being delivered to me. 

By the time GDB decides to ignore the SIGCHLD, you've already incurred
the overhead of notifying GDB and context switching into it. Then GDB,
in userspace, has to waitpid(), look at WIFSTOPPED(status),
WSTOPSIG(status) and then decide to do nothing and ptrace(PTRACE_CONT)
if the signal was one of the ignored signals. Lots of unnecessary
overhead in this case.

It is obvious to me that you and I are going to continue disagreeing
about this and arguing endlessly about this capability, so I would like
to in all modesty solicit other folks opinion about this capability
too...

Thanks

- Bhavesh

Bhavesh P. Davda | Distinguished Member of Technical Staff | Avaya |
1300 West 120th Avenue | B3-B03 | Westminster, CO 80234 | U.S.A. |
Voice/Fax: 303.538.4438 | bhavesh@avaya.com

             reply	other threads:[~2005-09-27 21:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-27 21:55 Davda, Bhavesh P (Bhavesh) [this message]
2005-09-28 14:10 ` [RFC PATCH] New SA_NOPRNOTIF sigaction flag Daniel Jacobowitz
  -- strict thread matches above, loose matches on Subject: below --
2005-10-03 15:21 Davda, Bhavesh P (Bhavesh)
2005-10-03 16:12 ` Daniel Jacobowitz
2005-09-28 19:11 Davda, Bhavesh P (Bhavesh)
2005-10-03  0:27 ` Daniel Jacobowitz
2005-09-28 18:06 Davda, Bhavesh P (Bhavesh)
2005-09-28 18:33 ` Daniel Jacobowitz
2005-09-27 16:24 Davda, Bhavesh P (Bhavesh)
2005-09-27 20:39 ` Daniel Jacobowitz
2005-09-27 14:45 Davda, Bhavesh P (Bhavesh)
2005-09-27 15:55 ` Daniel Jacobowitz
2005-09-27 23:26 ` Valdis.Kletnieks
2005-09-26 17:39 Bhavesh P. Davda
2005-09-27 13:06 ` Daniel Jacobowitz

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=21FFE0795C0F654FAD783094A9AE1DFC086EFEEB@cof110avexu4.global.avaya.com \
    --to=bhavesh@avaya.com \
    --cc=dan@debian.org \
    --cc=linux-kernel@vger.kernel.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).