[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20081117181655.8BDE9154221@magilla.localdomain>
Date: Mon, 17 Nov 2008 10:16:55 -0800 (PST)
From: Roland McGrath <roland@...hat.com>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Frank Mayhar <fmayhar@...gle.com>,
Peter Zijlstra <peterz@...radead.org>,
Christoph Lameter <cl@...ux-foundation.org>,
Doug Chapman <doug.chapman@...com>, mingo@...e.hu,
adobriyan@...il.com, akpm@...ux-foundation.org,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: regression introduced by - timers: fix itimer/many thread hang
> > - 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.
That certainly will exclude the problem of crashing in the tick interrupt
after exit_notify. Unfortunately, it's moving in an undesireable direction
for the long run. That is, it loses from the accounting even more of the
CPU time spent on the exit path.
> 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?
Yes, I think you're right. The best solution that comes to mind off hand
is to protect the update/read of that u64 with a seqcount_t on 32-bit.
Thanks,
Roland
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists