[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1191944024.4281.72.camel@ghaskins-t60p.haskins.net>
Date: Tue, 09 Oct 2007 11:33:44 -0400
From: Gregory Haskins <ghaskins@...ell.com>
To: Steven Rostedt <rostedt@...dmis.org>,
Peter Zijlstra <peterz@...radead.org>
Cc: Ingo Molnar <mingo@...e.hu>,
linux-rt-users <linux-rt-users@...r.kernel.org>,
kravetz@...ibm.com, LKML <linux-kernel@...r.kernel.org>,
pmorreale@...ell.com, sdietrich@...ell.com,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH 0/5] RT: scheduler fixes and rt_overload enhancements
On Tue, 2007-10-09 at 11:00 -0400, Steven Rostedt wrote:
>
Hi Steve, Peter,
> --
> On Tue, 9 Oct 2007, Gregory Haskins wrote:
> > Hi All,
>
> Hi Gregory,
>
> >
> > The first two patches are from Mike and Steven on LKML, which the rest of my
> > series is dependent on. Patch #4 is a resend from earlier.
> >
> > Series Summary:
> >
> > 1) Send IPI on overload regardless of whether prev is an RT task
>
> OK.
>
> > 2) Set the NEEDS_RESCHED flag on reception of RESCHED_IPI
>
> Peter Zijlstra and I have been discussing this IPI Resched change a bit.
> It seems that it is too much overkill for what is needed. That is, the
> send_reschedule is used elsewhere where we do not want to actually do a
> schedule.
That is a good point. We definitely need a good "kick+resched" kind of
mechanism here, but perhaps it should be RTO specific instead of in the
primary data path. I guess a rq-lock + set(NEEDS_RESCHED) + IPI works
too.
On the flip side: Perhaps sending a reschedule-ipi that doesn't
reschedule is simply misused, and the misuse should be cleaned up
instead?
>
> I'm thinking about trying out a method that each rq has the priority of
> the current task that is running. On case where we get an rt overload
> (like in the finish_task_switch) we do a scan of all CPUS (not taking any
> locks) and find the CPU which the lowest priority. If that CPU has a lower
> prioirty than a waiting task to run on the current CPU then we grab the
> lock for that rq, check to see if the priority is still lower, and then
> push the rt task over to that CPU.
Great minds think alike ;) See attached for a patch I have been working
on in this area. It currently address the "wake_up" path. It would
also need to address the "preempted" path if we were to eliminate RTO
outright.
I wasn't going to share it quite yet, since its still a work in
progress. But the timing seems right now, given the discussion.
>
> If after taking the rq lock a schedule had taken place and a higher RT
> task is running, then we would try again, two more times. If this
> phenomenon happens two more times, we punt and wouldn't do anything else
> (paranoid attempt to fall into trying over and over on a high context
> switch RT system).
My patch currently doesn't address this yet, but I have been thinking
about it for the last day or so. I was wondering if perhaps an RCU
would be appropriate instead of the rwlock like I am using.
>
>
> > 3) Fix a mistargeted IPI on overload
> > 4) Track which CPUS are in overload for efficiency
> > 5) Track which CPUs are eligible for rebalancing for efficiency
>
> The above three may be obsoleted by this new algorithm.
On the same page with you, here.
Regards,
-Greg
View attachment "cpu_priority.patch" of type "text/x-patch" (11741 bytes)
Powered by blists - more mailing lists