Yang, Xiaowei wrote: > Tian, Kevin wrote: >>> From: George Dunlap >>> Sent: Monday, March 09, 2009 8:56 PM >>> >>> Hmm, I think this patch may not be exactly what we want. It looks >>> like it checks for how long a vcpu has been in its current stat, not >>> how recently it has been running. So if a vcpu sleeps for a long time >>> on a cpu that's running other workloads, then wakes up >>> (blocked->runnable), the cache is by no means "hot". But since it has >>> only been in the "runnable" state for a few hundred cycles, it won't >>> be migrated, even though there's little cost. >> Then to add a per-vcpu last_running_timestamp which is recorded when >> vcpu is scheduled out, could hit the purpose here? > Yes, it's more reasonable. I can make a patch. > The patch is attached. Had a quick test using the previous config and saw no obvious different result with it. May be explained by the fact that the benchmarks has no many IO operations - db and logfile are put to ramdisk for sysbench test. Anyway it's closer to what we really want. Thanks both of you! Signed-off-by: Xiaowei Yang Thanks, xiaowei