[PATCH] os: Turn off the scheduler alarm after an arbitrary length of time

Pat Kane pekane52 at gmail.com
Fri Jul 30 09:57:39 PDT 2010


On Thu, Jul 29, 2010 at 4:41 PM, Adam Jackson <ajax at redhat.com> wrote:
 > ...  the continuous stream of
 > SIGALRM shows up in strace and thus people report "infinite stream of
 > SIGALRM" rather than whatever the bug actually is.

I really hate those SIGALRMs.

Reviewed-by: Patrick E. Kane <pekane52 at gmail.com>

Pat
---

On Thu, Jul 29, 2010 at 4:41 PM, Adam Jackson <ajax at redhat.com> wrote:
> If we're stuck in some difficult bit of processing, there's no point in
> punishing the client too strongly.  Worse, the continuous stream of
> SIGALRM shows up in strace and thus people report "infinite stream of
> SIGALRM" rather than whatever the bug actually is.
>
> So if we're more than 10x past the maximum timeslice, just turn the
> signal off.
>
> Signed-off-by: Adam Jackson <ajax at redhat.com>
> ---
>  os/utils.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/os/utils.c b/os/utils.c
> index 51455cc..a3be61d 100644
> --- a/os/utils.c
> +++ b/os/utils.c
> @@ -1163,6 +1163,9 @@ static void
>  SmartScheduleTimer (int sig)
>  {
>     SmartScheduleTime += SmartScheduleInterval;
> +
> +    if (SmartScheduleTime >= 10 * SmartScheduleMaxSlice)
> +       SmartScheduleStopTimer();
>  }
>  #endif
>
> --
> 1.7.2
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
>


More information about the xorg-devel mailing list