On Tue, 2012-12-11 at 20:10 +0800, Hillf Danton wrote: > On Mon, Dec 10, 2012 at 10:21 PM, Steven Rostedt <rost...@goodmis.org> wrote: > > On Mon, 2012-12-10 at 20:19 +0800, Hillf Danton wrote: > >> When we are trying to push task out, no point to select the last cpu that > >> the given task executed on, which is fixed by selecting target cpu with > >> cache affinity concerned, and with SD_WAKE_AFFINE ignored as we are not > >> handling sleeper. > > > > I have to ask. Why? > > > > The check you are skipping is if the task is running on a CPU that is > > already the lowest CPU priority (lowest_mask returns the CPUs running > > tasks of the lowest priority in the system). > > Hm ... how do you get the lowest mask for a pushable task iff > that check makes sense?
I'm actually thinking that that test should always fail. The cpupri_find() does a scan of all priorities up to but not including the current task's priority. If cpupri_find() finds a mask, it means that it found CPUs that are running only tasks of lower priority than the task we are checking. Which means, it should never include the task's CPU, as that CPU should have a higher priority than what is being returned by lowest_mask. If it can't find a set of CPUs of lower priority, it should return false, and the find_lowest_rq() should exit. I'll add a WARN_ON_ONCE() there, and see if I can trigger it. :-/ -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/