Re: [PATCH 3/3] arm_timer: remove a racy and obsolete PF_EXITING check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I think this and your other two patches are fine fixes.  Thanks, Oleg.

> However, for some reason it does so only for CPUCLOCK_PERTHREAD
> case (which is imho wrong).

For a process CPU clock timer, ->it.cpu.task is the thread group leader.
The group leader can exit and will be a lingering zombie for as long as
other threads in the group live.  The process timers need to keep getting
armed and working both during and after the group leader's exit processing.

> Also, this check is not reliable, PF_EXITING could be set on
> another cpu without any locks/barriers just after the check,
> so it can't prevent from attaching the timer to the exiting
> task.
> 
> The previous patch makes this check unneeded.

Thanks for cleaning that up.  The original rationale behind the checking
for exiting threads was an attempt to avoid process_timer_rebalance
counting a dead thread as live and setting all the live threads' expiry
timers too short, as well as avoiding setting it_*_expires after do_exit
cleared them.  The latter didn't suffice anyway and you've fixed it another
way.  The former doesn't really do any harm, since it just means a
possibility of early wakeup and recheck in the remaining live threads.


Thanks,
Roland

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux