Re: [PATCH 2.6.27-rc5] Fix itimer/many thread hang.

From: Oleg Nesterov
Date: Wed Sep 10 2008 - 08:07:38 EST


On 09/09, Frank Mayhar wrote:
>
> On Tue, 2008-09-09 at 20:01 +0400, Oleg Nesterov wrote:
>
> > As for this particular function, it seems to me that ->signal == NULL
> > is not possible, no?
>
> That's not completely clear to me. I'm allowing for the possibility
> that it might be called during, say, process teardown. It's used in so
> many places that I'm uncomfortable leaving the == NULL check out.

Please see my reply to Roland.

> > Btw, this function has a lot of callers, perhaps it is better to
> > uninline it.
>
> If that's the consensus I'll do so. I assumed that speed was more
> important than space in this case. Am I mistaken?

Are you sure inline will be faster? It has a lot of calllers, think
about i-cache. And the function call is not that expensive.

But I am not expert.

> > So, the first CLONE_THREAD creates ->cputime.totals. After that
> > thread_group_cputime_account_xxx() start to use it even if the task
> > doesn't have the attached cpu timers.
> >
> > Stupid question: can't we allocate .totals in posix_cpu_timer_create() /
> > set_process_cpu_timer() ?
>
> That was the original plan but we (that is, Roland and I) decided to
> eliminate the separate storage for the dead-threads totals. It's now
> all kept in the totals field, for the whole thread group.

I see, thanks.

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/