From: Thomas Gleixner <tglx@linutronix.de>
To: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Pavel Emelyanov <xemul@openvz.org>,
Andrew Morton <akpm@linux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Roland McGrath <roland@redhat.com>
Subject: Re: [PATCH 3/3] Consolidate send_sigqueue and send_group_sigqueue
Date: Thu, 28 Feb 2008 05:54:51 +0100 (CET) [thread overview]
Message-ID: <alpine.LFD.1.00.0802280546360.7583@apollo.tec.linutronix.de> (raw)
In-Reply-To: <20080222144155.GA4349@tv-sign.ru>
On Fri, 22 Feb 2008, Oleg Nesterov wrote:
> > -
> > - if (unlikely(!list_empty(&q->list))) {
> > - /*
> > - * If an SI_TIMER entry is already queue just increment
> > - * the overrun count.
> > - */
> > - BUG_ON(q->info.si_code != SI_TIMER);
> > - q->info.si_overrun++;
> > - goto out;
> > - }
> > - /* Short-circuit ignored signals. */
> > - if (sig_ignored(p, sig)) {
> > - ret = 1;
> > - goto out;
> > - }
> > send_group_sigqueue(int sig, struct sigqueue *q, struct task_struct *p)
> > - /* Short-circuit ignored signals. */
> > - if (sig_ignored(p, sig)) {
> > - ret = 1;
> > - goto out;
> > - }
> > -
> > - if (unlikely(!list_empty(&q->list))) {
> > - /*
> > - * If an SI_TIMER entry is already queue just increment
> > - * the overrun count. Other uses should not try to
> > - * send the signal multiple times.
> > - */
> > - BUG_ON(q->info.si_code != SI_TIMER);
> > - q->info.si_overrun++;
> > - goto out;
> > - }
>
> Personally, I think this change is very good. But send_sigqueue() and
> send_group_sigqueue() have a very subtle difference which I was never
> able to understand.
>
> Let's suppose that sigqueue is already queued, and the signal is ignored
> (the latter means we should re-schedule cpu timer or handle overrruns).
> In that case send_sigqueue() returns 0, but send_group_sigqueue() returns 1.
>
> I think this is not the problem (in fact, I think this patch makes the
> behaviour more correct), but I hope Thomas can take a look and confirm.
It should not change anything. We should never have a signal enqueued
when it's ignored anyway.
Roland, any insight why this is different aside of a copy and paste
error ?
Thanks,
tglx
next prev parent reply other threads:[~2008-02-28 4:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-22 12:56 Pavel Emelyanov
2008-02-22 14:41 ` Oleg Nesterov
2008-02-28 4:54 ` Thomas Gleixner [this message]
2008-02-28 6:17 ` Oleg Nesterov
[not found] ` <20080228113633.7431C2700FD@magilla.localdomain>
2008-02-28 15:36 ` Oleg Nesterov
2008-02-28 20:14 ` Roland McGrath
2008-02-29 11:32 ` Oleg Nesterov
2008-02-28 22:32 ` Thomas Gleixner
2008-02-28 22:41 ` Roland McGrath
2008-02-29 8:04 ` Thomas Gleixner
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=alpine.LFD.1.00.0802280546360.7583@apollo.tec.linutronix.de \
--to=tglx@linutronix.de \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@tv-sign.ru \
--cc=roland@redhat.com \
--cc=xemul@openvz.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
all inboxes | Powered by JetHome®