Re: Q: posix_timer_event: can't we kill the "switch to ->group_leader on failure" ?

From: Roland McGrath
Date: Fri Aug 01 2008 - 17:31:33 EST


> posix_timer_event() drops SIGEV_THREAD_ID and switches to ->group_leader
> if send_sigqueue() fails.
>
> Is this really useful? I don't understand the point.

I don't think it's useful. SIGEV_THREAD_ID is used not really used by
applications directly at all. It's used by glibc internally to implement
the POSIX feature SIGEV_THREAD. The target thread is a private service
thread that glibc maintains. It should never die while there are timers
using it. If it does, there are no expectations about the abandoned timers
firing usefully at all.

> But more importantly, I think this code gives the false promises, it
> doesn't work reliably.

Userland never relied on any such promise. All that really needs to be
reliable is that the kernel doesn't keep a dangling pointer or task ref.

> If we can do the above, we can simplify the code further, see the patch
> below (should be 2 patches).

Probably fine, needs a little closer thought.


Thanks,
Roland
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/