linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] sigpending rework
@ 2004-12-13 23:06 Kalaky
  2004-12-14  1:14 ` Ulrich Drepper
  0 siblings, 1 reply; 2+ messages in thread
From: Kalaky @ 2004-12-13 23:06 UTC (permalink / raw)
  To: linux-kernel

Hello,

Currently, queued RT signals go into a list of pending signals
for a given task_struct (multiple RT signals can be queued).
When an process dequeues a signal through sigwaitinfo()
we must search the list for the given signal. This search is
always O(n) where n is the number of pending signals,
since we must go through all list members to ensure if
a signal number is still pending.

I'm working on converting the sigpending structure into a vector
of _NSIG sigqueue's for each signal number (which is quite a big
work), this way we can directly access each signal list, delivering
and checking any pending signals in a efficient manner.

Any thoughts ?

TIA,

Kalaky

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [RFC] sigpending rework
  2004-12-13 23:06 [RFC] sigpending rework Kalaky
@ 2004-12-14  1:14 ` Ulrich Drepper
  0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Drepper @ 2004-12-14  1:14 UTC (permalink / raw)
  To: Kalaky; +Cc: linux-kernel

On Mon, 13 Dec 2004 21:06:08 -0200, Kalaky <kalaky@gmail.com> wrote:
 
> 
> I'm working on converting the sigpending structure into a vector
> of _NSIG sigqueue's for each signal number (which is quite a big
> work), this way we can directly access each signal list, delivering
> and checking any pending signals in a efficient manner.

This looks like a logical extension but the question is, is it worth
it?  I don't know about a case so far where this is a bottle neck. 
But any solution will cost every process, regardless of whether it
uses signals often or not.

So, if your solution can avoid or keep the cost very very low, it
might be worth using such a change.  Otherwise the ol' saying applies:
avoid signals at all costs.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-12-14  1:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-13 23:06 [RFC] sigpending rework Kalaky
2004-12-14  1:14 ` Ulrich Drepper

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).