Ingo Molnar wrote: > * Nick Piggin wrote: > > >>Ingo, I wasn't aware that tasks are bouncing around wildly; does your >>patch improve things? Then by definition it must penalise workloads >>where the pairings are more predictable? > > > for TPC, most of the non-to-idle migrations are 'wrong'. So basically Sure, OK. > any change that gets rid of extra migrations is a win. This does not > mean that it is all bouncing madly. > Yes... semantics aside it is obviously something we want to eliminate if possible. > >>I would prefer to try fixing wake balancing before giving up and >>turning it off for busy CPUs. > > > agreed, and that was my suggestion: improve the heuristics to not hurt > workloads where there is no natural pairing. > > one possible way would be to do a task_hot() check in the passive > balancing code, and only migrate the task when it's been inactive for a > long time: that should be the case for most TPC wakeups. (This assumes > an accurate cache-hot estimator, for which another patch exists.) > That sounds like a reasonable avenue to investigate. There was something similar there before, but I found that there was a sharp point where runqueue lengths got just the right length for performance characteristics of some things to change. This could have been made worse by inadequate cache-hot estimate though. One thing I will look into is to check whether we can use previous wakeup patterns to check whether the pattern looks random, or affine to some group of CPUs. This could potentially allow us to have stronger affinity than we currently do for the "good" workloads, while eliminating task movement completely for bad cases. Something along the lines of the attached patch may be 'good enough', though I'd like to try a few other things as well. > >>Without any form of wake balancing, then a multiprocessor system will >>tend to have a completely random distribution of tasks over CPUs over >>time. I prefer to add a driver so it is not completely random for >>amenable workloads. > > > but my patch does not do 'no form of wake balancing'. It will do > non-load-related wake balancing if the target CPU is idle. Arguably, > that can easily be 'never' under common workloads. > No that's true - I didn't mean to imply that your patch would completely eliminate this input. Thanks, Nick -- SUSE Labs, Novell Inc.