These fields are currently not initialized upon fork. I noted that when Iupdated to 2.6.31-rc2; commit 6c594c21fcb02c662f11c97be4d7d2b73060a205 wasmerged into kernel by Ingo (not present yet in 2.6.30), but it only initializesnr_migrations. Why the other fields are not initialized to 0? Even when thereare more processors, these fields may be wrong if not zeroed when a new taskis started. Below the fast way to fix it. This fixed the counters for me.

What do you think of creating a struct sched_statistics embedded intosched_entity so we coudl memset it to zero all at once? All fields ofSCHED_STATS piece should be initialized, right?