Re: sched_pin() bug in SCHED_ULE

2010-09-01 Thread John Baldwin
On Tuesday, August 31, 2010 2:53:12 pm m...@freebsd.org wrote: On Tue, Aug 31, 2010 at 10:16 AM, m...@freebsd.org wrote: I recorded the stack any time ts-ts_cpu was set and when a thread was migrated by sched_switch() I printed out the recorded info. Here's what I found: XXX bug

Re: sched_pin() bug in SCHED_ULE

2010-09-01 Thread mdf
On Wed, Sep 1, 2010 at 6:49 AM, John Baldwin j...@freebsd.org wrote: On Tuesday, August 31, 2010 2:53:12 pm m...@freebsd.org wrote: On Tue, Aug 31, 2010 at 10:16 AM,  m...@freebsd.org wrote: I recorded the stack any time ts-ts_cpu was set and when a thread was migrated by sched_switch() I

Re: sched_pin() bug in SCHED_ULE

2010-09-01 Thread Alan Cox
m...@freebsd.org wrote: [snip] I will test this patch out; thanks for the help! Two questions: 1) How does a thread get moved between CPUs when it's not running? I see that we change the runqueue for non-running threads that are on a runqueue. Does the code always check for THREAD_CAN_SCHED

Re: sched_pin() bug in SCHED_ULE

2010-09-01 Thread John Baldwin
On Wednesday, September 01, 2010 12:54:13 pm m...@freebsd.org wrote: On Wed, Sep 1, 2010 at 6:49 AM, John Baldwin j...@freebsd.org wrote: On Tuesday, August 31, 2010 2:53:12 pm m...@freebsd.org wrote: On Tue, Aug 31, 2010 at 10:16 AM, m...@freebsd.org wrote: I recorded the stack any time

Re: sched_pin() bug in SCHED_ULE

2010-08-31 Thread mdf
I recorded the stack any time ts-ts_cpu was set and when a thread was migrated by sched_switch() I printed out the recorded info. Here's what I found: XXX bug 67957: moving 0xff003ff9b800 from 3 to 1 [1]: pin 0 state 4 move 3 - 1 done by 0xff000cc44000: #0 0x802b36b4 at

Re: sched_pin() bug in SCHED_ULE

2010-08-31 Thread mdf
On Tue, Aug 31, 2010 at 10:16 AM, m...@freebsd.org wrote: I recorded the stack any time ts-ts_cpu was set and when a thread was migrated by sched_switch() I printed out the recorded info.  Here's what I found: XXX bug 67957: moving 0xff003ff9b800 from 3 to 1 [1]: pin 0 state 4 move 3 -

Re: sched_pin() bug in SCHED_ULE

2010-08-26 Thread John Baldwin
On Thursday, August 26, 2010 4:03:38 pm m...@freebsd.org wrote: Back at the beginning of August I posted about issues with sched_pin() and witness_warn(): http://lists.freebsd.org/pipermail/freebsd-hackers/2010-August/032553.html After a lot of debugging I think I've basically found the

Re: sched_pin() bug in SCHED_ULE

2010-08-26 Thread mdf
On Thu, Aug 26, 2010 at 1:49 PM, John Baldwin j...@freebsd.org wrote: On Thursday, August 26, 2010 4:03:38 pm m...@freebsd.org wrote: Back at the beginning of August I posted about issues with sched_pin() and witness_warn():

Re: sched_pin() bug in SCHED_ULE

2010-08-26 Thread Andriy Gapon
on 27/08/2010 00:20 m...@freebsd.org said the following: I tried making sched_pin() a real function which used intr_disable/intr_restore around saving off td-td_oncpu, td-td_lastcpu and ts-ts_cpu, and the stack at the time of call. In sched_switch when I saw an unexpected migration I

Re: sched_pin() bug in SCHED_ULE

2010-08-26 Thread mdf
On Thu, Aug 26, 2010 at 3:10 PM, Andriy Gapon a...@icyb.net.ua wrote: on 27/08/2010 00:20 m...@freebsd.org said the following: I tried making sched_pin() a real function which used intr_disable/intr_restore around saving off td-td_oncpu, td-td_lastcpu and ts-ts_cpu, and the stack at the time