Re: [patch 1/4] signalfd v1 - signalfd core ...

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jeremy Fitzhardinge
Date: Wednesday, March 7, 2007 - 2:26 pm

Davide Libenzi wrote:
Well, I think using both this mechanism and normal signal delivery would
be pretty much insane.  But if you do, then the only sane way to use the
interface is if each signal is delivered once - and only once - by
whatever mechanism (otherwise how would you be able to distinguish
between the same signal duplicated vs two signals which look very
similar?).  If you're really worried about losing a signal between poll
and read you can always make the fd nonblocking.


OK, but if you allow the kernel to duplicate along different delivery
paths, usermode pretty much has to go to the effort of making sure
there's only one delivery path in order to keep track of how many
signals really appeared.

The only way to make duplication sane is to guarantee that if a signal
path *can* deliver a signal, it *will* deliver the signal, so that
usermode has some chance of correlating queued signals along each path.

But if you do that, then you end up with bad results.  If you have a
signal blocked, then it means you're obligated to keep the signal queued
forever in case the signal gets unblocked, even if usermode already got
it via a signalfd and has no intention of ever unblocking the signal. 
Similarly with a signalfd that never gets read.  And if you fill the
pending signal queue, do you start dropping signals?


Hm.  Yeah, that's tough.  If you have a 32-bit and 64-bit process
reading from the same signalfd source, would you expect them to return
the same format or different?


    J
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 1/4] signalfd v1 - signalfd core ..., Davide Libenzi, (Tue Mar 6, 6:36 pm)
Re: [patch 1/4] signalfd v1 - signalfd core ..., Davide Libenzi, (Tue Mar 6, 6:43 pm)
Re: [patch 1/4] signalfd v1 - signalfd core ..., Stephen Rothwell, (Tue Mar 6, 9:55 pm)
Re: [patch 1/4] signalfd v1 - signalfd core ..., Davide Libenzi, (Wed Mar 7, 12:11 am)
Re: [patch 1/4] signalfd v1 - signalfd core ..., Stephen Rothwell, (Wed Mar 7, 5:38 am)
Re: [patch 1/4] signalfd v1 - signalfd core ..., Linus Torvalds, (Wed Mar 7, 9:57 am)
Re: [patch 1/4] signalfd v1 - signalfd core ..., Davide Libenzi, (Wed Mar 7, 10:42 am)
Re: [patch 1/4] signalfd v1 - signalfd core ..., Davide Libenzi, (Wed Mar 7, 10:50 am)
Re: [patch 1/4] signalfd v1 - signalfd core ..., Jeremy Fitzhardinge, (Wed Mar 7, 1:30 pm)
Re: [patch 1/4] signalfd v1 - signalfd core ..., Davide Libenzi, (Wed Mar 7, 1:56 pm)
Re: [patch 1/4] signalfd v1 - signalfd core ..., Jeremy Fitzhardinge, (Wed Mar 7, 2:26 pm)
Re: [patch 1/4] signalfd v1 - signalfd core ..., Davide Libenzi, (Wed Mar 7, 2:35 pm)
Re: [patch 1/4] signalfd v1 - signalfd core ..., Linus Torvalds, (Wed Mar 7, 2:48 pm)
Re: [patch 1/4] signalfd v1 - signalfd core ..., Ulrich Drepper, (Wed Mar 7, 3:01 pm)
Re: [patch 1/4] signalfd v1 - signalfd core ..., Davide Libenzi, (Wed Mar 7, 3:01 pm)
Re: [patch 1/4] signalfd v1 - signalfd core ..., Davide Libenzi, (Wed Mar 7, 3:10 pm)
Re: [patch 1/4] signalfd v1 - signalfd core ..., Jeremy Fitzhardinge, (Wed Mar 7, 3:14 pm)
Re: [patch 1/4] signalfd v1 - signalfd core ..., Davide Libenzi, (Wed Mar 7, 3:21 pm)
Re: [patch 1/4] signalfd v1 - signalfd core ..., Ulrich Drepper, (Thu Mar 15, 10:16 pm)
Re: [patch 1/4] signalfd v1 - signalfd core ..., Davide Libenzi, (Thu Mar 15, 11:31 pm)