Messages in this thread | | | Date | Mon, 17 Nov 2008 15:36:23 +0100 | From | Oleg Nesterov <> | Subject | Re: regression introduced by - timers: fix itimer/many thread hang |
| |
On 11/14, Oleg Nesterov wrote: > > Currently I am trying to find the ugly, but simple fixes for 2.6.28. > > account_group_user_time(), run_posix_cpu_timers() are simpler to > fix. Again, I need to actually read the code, but afaics we can > rely on the fact that the task is current, so we can change the > code > > - if (!->signal) > + if (->exit_state) > return;
Yes, unless I missed something again, this should work. I'll send the (simple) patches soon, but I have no idea how to test them.
However, I'm afraid there is another problem. On 32 bit cpus we can't read "u64 sum_exec_runtime" atomically, and so thread_group_cputime() can "overestimate" ->sum_exec_runtime by (up to) UINT_MAX if it races with the thread which updates its per_cpu_ptr(.totals). This for example means that check_process_timers() can fire the CPUCLOCK_SCHED timers before time.
No?
Oleg.
| |