Re: [PATCH RT] Defer migrate_enable migration while task state != TASK_RUNNING

2018-03-26 Thread Steven Rostedt
On Mon, 26 Mar 2018 11:54:51 -0400 joe.ko...@concurrent-rt.com wrote: > Oh well. Makes me wonder why might_sleep is testing for > !TASK_RUNNABLE though. Because might_sleep() is used when the function might call schedule() directly. And schedule() *will* change the task state to TASK_RUNNING. mi

Re: [PATCH RT] Defer migrate_enable migration while task state != TASK_RUNNING

2018-03-26 Thread joe . korty
Oh well. Makes me wonder why might_sleep is testing for !TASK_RUNNABLE though. Thanks for the correction, Joe On Mon, Mar 26, 2018 at 11:35:15AM -0400, Steven Rostedt wrote: > On Fri, 23 Mar 2018 13:21:31 -0400 > joe.ko...@concurrent-rt.com wrote: > > > My understanding is, in standard Linux a

Re: [PATCH RT] Defer migrate_enable migration while task state != TASK_RUNNING

2018-03-26 Thread Steven Rostedt
On Fri, 23 Mar 2018 13:21:31 -0400 joe.ko...@concurrent-rt.com wrote: > My understanding is, in standard Linux and in rt, setting > task state to anything other than TASK_RUNNING in of itself > blocks preemption. That is clearly false. The only thing that blocks preemption with a CONFIG_PREEMPT k

Re: [PATCH RT] Defer migrate_enable migration while task state != TASK_RUNNING

2018-03-23 Thread Julia Cartwright
On Fri, Mar 23, 2018 at 01:21:31PM -0400, joe.ko...@concurrent-rt.com wrote: > On Fri, Mar 23, 2018 at 11:59:21AM -0500, Julia Cartwright wrote: > > On Fri, Mar 23, 2018 at 11:09:59AM -0400, joe.ko...@concurrent-rt.com wrote: > > > I see the below kernel splat in 4.9-rt when I run a test program th

Re: [PATCH RT] Defer migrate_enable migration while task state != TASK_RUNNING

2018-03-23 Thread joe . korty
Hi Julia, Thanks for the quick response! On Fri, Mar 23, 2018 at 11:59:21AM -0500, Julia Cartwright wrote: > Hey Joe- > > Thanks for the writeup. > > On Fri, Mar 23, 2018 at 11:09:59AM -0400, joe.ko...@concurrent-rt.com wrote: > > I see the below kernel splat in 4.9-rt when I run a test program

Re: [PATCH RT] Defer migrate_enable migration while task state != TASK_RUNNING

2018-03-23 Thread Julia Cartwright
Hey Joe- Thanks for the writeup. On Fri, Mar 23, 2018 at 11:09:59AM -0400, joe.ko...@concurrent-rt.com wrote: > I see the below kernel splat in 4.9-rt when I run a test program that > continually changes the affinity of some set of running pids: > >do not call blocking ops when !TASK_RUNNING

[PATCH RT] Defer migrate_enable migration while task state != TASK_RUNNING

2018-03-23 Thread joe . korty
I see the below kernel splat in 4.9-rt when I run a test program that continually changes the affinity of some set of running pids: do not call blocking ops when !TASK_RUNNING; state=2 set at ... ... stop_one_cpu+0x60/0x80 migrate_enable+0x21f/0x3e0 rt_spin_unlock+0x2f/0