Re: [Lse-tech] Re: [Patch 4/7] Add sysctl for delay accounting

Arjan van de Ven
2006-02-27T11:24:33Z

>
> One of the reasons that alloc_delays() is a bit ugly is to handle the case
> that tasks might get created between the two loops. Even with RCU kind of
> locking (except for changing the locking primitives of-course), this code would
> work fine. Once delayacct_on is set to 1, copy_process() should take care of
> allocating the delays structure. alloc_delays() re-iterates through the list
> of tasks to find tasks whose allocation got missed. This revisit happens
> at most once due to the small window in which we check for delayacct_on
> and allocate the task's delays structure. If tasks are missed within that
> window, we revisit the tasks again and allocate for them.

well you assume you CAN walk all tasks... which is something afaik
that's being deprecated ;)