Re: [PATCH] posix-timers: Do not modify an already queued timer signal

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Mark McLoughlin <markmc@...>
Cc: <linux-kernel@...>, <kvm@...>, Roland McGrath <roland@...>, Thomas Gleixner <tglx@...>
Date: Thursday, July 17, 2008 - 9:55 am

On 07/17, Mark McLoughlin wrote:

Indeed! Thanks Mark.

Thomas, Roland, could you take a look?



Agreed, this one looks worse.


I forgot (if ever knew ;) this code completely, but can't we make a simpler
fix? posix_timer_event() can check list_empty() lockless,

	posix_timer_event()
	{
		if (!list_emtpy(sigq->list))
			return 0;

		... fill and send ->sigq...
	}

When the signal will be dequeued, schedule_next_timer() should afaics
set ->it_overrun_last which is copied to ->si_overrun then. Or we can
increment timr->it_overrun before return if I misread hrtimer_forward().

What do you think?


Another possible fix... we can change sys_timer_settime() to do
sigqueue_free() and re-alloc ->sigq when it is pending. Not that
I like this very much though.

Oleg.

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

Messages in current thread:
Re: [PATCH] posix-timers: Do not modify an already queued ti..., Oleg Nesterov, (Thu Jul 17, 9:55 am)