Re: -rt more realtime scheduling issues

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Steven Rostedt <rostedt@...>
Cc: Ingo Molnar <mingo@...>, Linux Kernel Mailing List <linux-kernel@...>
Date: Wednesday, October 10, 2007 - 10:37 pm

On Wed, Oct 10, 2007 at 07:50:52AM -0400, Steven Rostedt wrote:

Yes right.  I guess I spent too much time thinking about the 'broadcast
IPI' case where NEED_RESCHED is only set by the handler.  In the case
where we 'reschedule' on a specific CPU the flag is set and IPI sent.



One more thing.  test_thread_flag() uses thread info of the current
thread.  But, if __schedule() did a context switch then it is possible
the NEED_RESCHED flag was set in the previous task, instead of current.
Does that make sense?  The resched flags get cleared at the begining
of __schedule (as they should).  But, if we really want that loop to
be valid shouldn't the flags be copied to the current task.  Something
like the following after the context switch:

	if (test_and_clear_tsk_thread_flag(prev, TIF_NEED_RESCHED))
		set_tsk_need_resched(current);
	if (test_and_clear_tsk_thread_flag(prev, TIF_NEED_RESCHED_DELAYED))
		set_tsk_need_resched_delayed(current);

Don't we also need to worry about the flags being left set in the
previous task?  That is why I think a test_and_clear would make sense.

But, your argument about axing the loop altogether makes sense as well.


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

Messages in current thread:
-rt more realtime scheduling issues, Mike Kravetz, (Fri Oct 5, 10:15 pm)
[PATCH RT] fix rt-task scheduling issue, Steven Rostedt, (Mon Oct 8, 10:46 pm)
Re: [PATCH RT] fix rt-task scheduling issue, Mike Kravetz, (Tue Oct 9, 2:51 pm)
Re: [PATCH RT] fix rt-task scheduling issue, Gregory Haskins, (Tue Oct 9, 12:18 am)
Re: -rt more realtime scheduling issues, Mike Kravetz, (Mon Oct 8, 2:45 pm)
Re: -rt more realtime scheduling issues, Steven Rostedt, (Mon Oct 8, 11:04 pm)
Re: -rt more realtime scheduling issues, Mike Kravetz, (Tue Oct 9, 2:49 pm)
Re: -rt more realtime scheduling issues, Steven Rostedt, (Wed Oct 10, 7:50 am)
Re: -rt more realtime scheduling issues, Mike Kravetz, (Wed Oct 10, 10:37 pm)
Re: -rt more realtime scheduling issues, Peter Zijlstra, (Tue Oct 9, 4:16 am)