On Fri, Mar 03, 2017 at 01:41:59PM -0600, Julia Cartwright wrote: > On Thu, Mar 02, 2017 at 03:23:02AM +0000, Patel, Vedang wrote: [..] > > Case 1: > > TASK CPU TIMESTAMP EVENT > > cyclictest-2351 [003] 7773.130964: hrtimer_start: hrtimer=0xffff88046b098828 function=posix_timer_fn/0x0 expires=7767043047952 softexpires=7767043047952 > > cyclictest-2351 [003] 7773.130978: sched_switch: cyclictest:2351 [19] S ==> ktimersoftd/3:36 [98] > > ktimersoftd/3-36 [003] 7773.130992: sched_switch: ktimersoftd/3:36 [98] R ==> cyclictest:2351 [19] > > cyclictest-2351 [003] 7773.131003: sched_switch: cyclictest:2351 [19] D ==> ktimersoftd/3:36 [19] <--- cyclictest is in TASK_UNINTERRUPTIBLE state. > > ktimersoftd/3-36 [003] 7773.131006: signal_generate: sig=14 errno=0 code=131070 comm=cyclictest pid=2351 grp=0 res=0 > > ktimersoftd/3-36 [003] 7773.131018: sched_switch: ktimersoftd/3:36 [98] R ==> cyclictest:2351 [19] > > cyclictest-2351 [003] 7773.131031: sched_switch: cyclictest:2351 [19] D ==> ktimersoftd/3:36 [19] > > ktimersoftd/3-36 [003] 7773.131046: sched_switch: ktimersoftd/3:36 [98] R ==> cyclictest:2351 [19] > > This ktimersoftd -> cyclictest -> ktimersoftd -> cyclictest "bounce" is > a result of how the signal completion code for the posix itimers is > done. > > [ktimersoftd] [cyclictest] > lock task->sighand > set pending signal > signal_wake_up(task) ---> > lock task->sighand (*blocked*, state D) > <--- > trace signal_generate > unlock task->sighand > ---> > while (!pending signal) > unlock task->sighand > wait for signal > lock task->sighand > unlock task->sighand A corrected diagram below (same codepaths, layed out differently): [ktimersoftd] [cyclictest] lock task->sighand while (!pending signal) { unlock task->sighand wait for signal (state S) ... after interval ... lock task->sighand set pending signal signal_wake_up(task) ---> (woken, state R) lock task->sighand (*blocked*, state D) <--- trace signal_generate unlock task->sighand ---> } unlock task->sighand ... Julia
Attachment:
signature.asc
Description: PGP signature