From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Davide Libenzi <davidel@xmailserver.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [patch 1/4] signalfd v1 - signalfd core ...
Date: Wed, 07 Mar 2007 12:30:47 -0800 [thread overview]
Message-ID: <45EF20F7.1050307@goop.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0703070943180.12283@alien.or.mcafeemobile.com>
Davide Libenzi wrote:
> On Wed, 7 Mar 2007, Linus Torvalds wrote:
>
>
>> On Wed, 7 Mar 2007, Stephen Rothwell wrote:
>>
>>> You probably need the queue anyway because the real time signals are
>>> supposed to queue.
>>>
>> Davide - the *real* problem is (I think) that you try to allow signals to
>> be returned *both* by signalfd() and as a real signal.
>>
>> That's wrong, wrong, wrong.
>>
>> My original patch used "dequeue_signal()" to dequeue signals. Trust me, I
>> did that for a reason. Your re-design to think that you can get the signal
>> without using the real signal dequeueing is simply broken.
>>
>
> I think having the ability to have both can be usefull, so the idea of
> having multiple listeners fd (that both would not work with the single
> queue since they'd racing over dequeue_signal).
>
Do you have a specific use-case in mind? Because I don't think this is
very useful at all; in fact it may be the opposite of useful.
Generally signals are "owned" by one particular piece of code, and if
you want to distribute the event further then you do that in the app, as
you have to do with a normal signal handler. This code is the fd-based
analog of sigtimedwait, and so it should behave basically the same way.
If multiple threads call sigtimedwait on the same signal set, then one
and only one will receive each signal. This is good, because it means
you can have a thread pool processing signals (and other events) knowing
that there won't be duplicate processing.
I haven't looked at your code in detail, but it isn't clear from your
description whether you can have multiple signalfds for different
(distinct) sets of signals. That would be useful as a first level of
demultiplexing between multiple user-mode signal consumers. If you
allow that, you need to decide whether a read/poll on a signalfd blocks
until the head queued signal is part of the signal set, or if any queued
signal is in the set.
J
next prev parent reply other threads:[~2007-03-07 20:30 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-07 1:36 [patch 1/4] signalfd v1 - signalfd core Davide Libenzi
2007-03-07 1:43 ` Davide Libenzi
2007-03-07 4:55 ` Stephen Rothwell
2007-03-07 7:11 ` Davide Libenzi
2007-03-07 12:38 ` Stephen Rothwell
2007-03-07 16:57 ` Linus Torvalds
2007-03-07 17:50 ` Davide Libenzi
2007-03-07 20:30 ` Jeremy Fitzhardinge [this message]
2007-03-07 20:56 ` Davide Libenzi
2007-03-07 21:26 ` Jeremy Fitzhardinge
2007-03-07 21:35 ` Davide Libenzi
2007-03-07 21:48 ` Linus Torvalds
2007-03-07 22:01 ` Ulrich Drepper
2007-03-07 22:10 ` Davide Libenzi
2007-03-16 5:16 ` Ulrich Drepper
2007-03-16 6:31 ` Davide Libenzi
2007-03-07 22:01 ` Davide Libenzi
2007-03-07 22:14 ` Jeremy Fitzhardinge
2007-03-07 22:21 ` Davide Libenzi
2007-03-07 17:42 ` Davide Libenzi
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=45EF20F7.1050307@goop.org \
--to=jeremy@goop.org \
--cc=akpm@linux-foundation.org \
--cc=davidel@xmailserver.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.