This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Signal handling tune up.

On Mon, Aug 18, 2003 at 08:17:36PM -0400, Pierre A. Humblet wrote:
>During my work on using the multimedia timer for setitimer I noticed
>that Cygwin was not optimized to handle 1000 signals per second.
>It starts trashing under heavy load. Attached is a tune up patch.
>It also modestly improves performances at light load and fixes a
>race condition.
>Some explanations are in order, here they are.

I will break down your patch and apply what I think is appropriate but
I would appreciate one patch/one bug in the future.

For now, I've applied this:

>        movl    $0,%0                   # zero the signal number as a   \n\
>                                        # flag to the signal handler thread\n\
>                                        # that it is ok to set up sigsave\n\
>                                                                        \n\
>       call    _set_process_mask@4
>There is a race where the sigthread can start a handler for a signal that
>should be blocked.
>Simply interchanging the order still allows the sigthread to try to launch 
>a handler (before the mask is set), discovers that sigsave is busy and takes 
>cumbersome actions (e.g. Sleep).
>The patch moves set_process_mask all the way up to interrupt_setup(), so
>it is set in the sigthread itself.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]