Re: sched_pin() versus PCPU_GET

2010-08-08 Thread mdf
On Sun, Aug 8, 2010 at 2:43 PM, Attilio Rao wrote: > 2010/8/4  : >> On Fri, Jul 30, 2010 at 2:31 PM, John Baldwin wrote: >>> On Friday, July 30, 2010 10:08:22 am John Baldwin wrote: On Thursday, July 29, 2010 7:39:02 pm m...@freebsd.org wrote: > We've seen a few instances at work where

Re: sched_pin() versus PCPU_GET

2010-08-08 Thread Attilio Rao
2010/8/4 : > On Fri, Jul 30, 2010 at 2:31 PM, John Baldwin wrote: >> On Friday, July 30, 2010 10:08:22 am John Baldwin wrote: >>> On Thursday, July 29, 2010 7:39:02 pm m...@freebsd.org wrote: >>> > We've seen a few instances at work where witness_warn() in ast() >>> > indicates the sched lock is

Re: sched_pin() versus PCPU_GET

2010-08-06 Thread Attilio Rao
2010/8/5 John Baldwin : > On Thursday, August 05, 2010 11:59:37 am m...@freebsd.org wrote: >> On Wed, Aug 4, 2010 at 11:55 AM, John Baldwin wrote: >> > On Wednesday, August 04, 2010 12:20:31 pm m...@freebsd.org wrote: >> >> On Wed, Aug 4, 2010 at 2:26 PM, John Baldwin wrote: >> >> > On Tuesday, A

Re: sched_pin() versus PCPU_GET

2010-08-05 Thread mdf
>> (gdb) p panic_cpu >> $9 = 2 >> (gdb) p dumptid >> $12 = 100751 >> (gdb) p cpuhead.slh_first->pc_allcpu.sle_next->pc_curthread->td_tid >> $14 = 100751 >> >> (gdb) p *cpuhead.slh_first->pc_allcpu.sle_next >> $6 = { >>   pc_curthread = 0xff00716d6960, >>   pc_cpuid = 2, >>   pc_spinlocks = 0xff

Re: sched_pin() versus PCPU_GET

2010-08-05 Thread John Baldwin
On Thursday, August 05, 2010 11:59:37 am m...@freebsd.org wrote: > On Wed, Aug 4, 2010 at 11:55 AM, John Baldwin wrote: > > On Wednesday, August 04, 2010 12:20:31 pm m...@freebsd.org wrote: > >> On Wed, Aug 4, 2010 at 2:26 PM, John Baldwin wrote: > >> > On Tuesday, August 03, 2010 9:46:16 pm m...

Re: sched_pin() versus PCPU_GET

2010-08-05 Thread John Baldwin
On Thursday, August 05, 2010 12:01:22 pm m...@freebsd.org wrote: > On Wed, Aug 4, 2010 at 9:20 AM, wrote: > > On Wed, Aug 4, 2010 at 2:26 PM, John Baldwin wrote: > >> Actually, I would beg to differ in that case. If PCPU_GET(spinlocks) > >> returns non-NULL, then it means that you hold a spin l

Re: sched_pin() versus PCPU_GET

2010-08-05 Thread Kostik Belousov
On Thu, Aug 05, 2010 at 09:01:22AM -0700, m...@freebsd.org wrote: > On Wed, Aug 4, 2010 at 9:20 AM, wrote: > > On Wed, Aug 4, 2010 at 2:26 PM, John Baldwin wrote: > >> Actually, I would beg to differ in that case.  If PCPU_GET(spinlocks) > >> returns non-NULL, then it means that you hold a spin

Re: sched_pin() versus PCPU_GET

2010-08-05 Thread mdf
On Wed, Aug 4, 2010 at 9:20 AM, wrote: > On Wed, Aug 4, 2010 at 2:26 PM, John Baldwin wrote: >> Actually, I would beg to differ in that case.  If PCPU_GET(spinlocks) >> returns non-NULL, then it means that you hold a spin lock, > > ll_count is 0 for the "correct" pc_spinlocks and non-zero for th

Re: sched_pin() versus PCPU_GET

2010-08-05 Thread mdf
On Wed, Aug 4, 2010 at 11:55 AM, John Baldwin wrote: > On Wednesday, August 04, 2010 12:20:31 pm m...@freebsd.org wrote: >> On Wed, Aug 4, 2010 at 2:26 PM, John Baldwin wrote: >> > On Tuesday, August 03, 2010 9:46:16 pm m...@freebsd.org wrote: >> >> On Fri, Jul 30, 2010 at 2:31 PM, John Baldwin

Re: sched_pin() versus PCPU_GET

2010-08-04 Thread John Baldwin
On Wednesday, August 04, 2010 12:20:31 pm m...@freebsd.org wrote: > On Wed, Aug 4, 2010 at 2:26 PM, John Baldwin wrote: > > On Tuesday, August 03, 2010 9:46:16 pm m...@freebsd.org wrote: > >> On Fri, Jul 30, 2010 at 2:31 PM, John Baldwin wrote: > >> > On Friday, July 30, 2010 10:08:22 am John Bal

Re: sched_pin() versus PCPU_GET

2010-08-04 Thread mdf
On Wed, Aug 4, 2010 at 2:26 PM, John Baldwin wrote: > On Tuesday, August 03, 2010 9:46:16 pm m...@freebsd.org wrote: >> On Fri, Jul 30, 2010 at 2:31 PM, John Baldwin wrote: >> > On Friday, July 30, 2010 10:08:22 am John Baldwin wrote: >> >> On Thursday, July 29, 2010 7:39:02 pm m...@freebsd.org w

Re: sched_pin() versus PCPU_GET

2010-08-04 Thread John Baldwin
On Tuesday, August 03, 2010 9:46:16 pm m...@freebsd.org wrote: > On Fri, Jul 30, 2010 at 2:31 PM, John Baldwin wrote: > > On Friday, July 30, 2010 10:08:22 am John Baldwin wrote: > >> On Thursday, July 29, 2010 7:39:02 pm m...@freebsd.org wrote: > >> > We've seen a few instances at work where witn

Re: sched_pin() versus PCPU_GET

2010-08-03 Thread mdf
On Fri, Jul 30, 2010 at 2:31 PM, John Baldwin wrote: > On Friday, July 30, 2010 10:08:22 am John Baldwin wrote: >> On Thursday, July 29, 2010 7:39:02 pm m...@freebsd.org wrote: >> > We've seen a few instances at work where witness_warn() in ast() >> > indicates the sched lock is still held, but th

Re: sched_pin() versus PCPU_GET

2010-07-30 Thread John Baldwin
On Friday, July 30, 2010 10:08:22 am John Baldwin wrote: > On Thursday, July 29, 2010 7:39:02 pm m...@freebsd.org wrote: > > We've seen a few instances at work where witness_warn() in ast() > > indicates the sched lock is still held, but the place it claims it was > > held by is in fact sometimes n

Re: sched_pin() versus PCPU_GET

2010-07-30 Thread John Baldwin
On Thursday, July 29, 2010 7:39:02 pm m...@freebsd.org wrote: > We've seen a few instances at work where witness_warn() in ast() > indicates the sched lock is still held, but the place it claims it was > held by is in fact sometimes not possible to keep the lock, like: > > thread_lock(td); >

Re: sched_pin() versus PCPU_GET

2010-07-30 Thread mdf
2010/7/30 Kostik Belousov : > On Thu, Jul 29, 2010 at 04:57:25PM -0700, m...@freebsd.org wrote: >> On Thu, Jul 29, 2010 at 4:39 PM,   wrote: >> > We've seen a few instances at work where witness_warn() in ast() >> > indicates the sched lock is still held, but the place it claims it was >> > held by

Re: sched_pin() versus PCPU_GET

2010-07-30 Thread Kostik Belousov
On Thu, Jul 29, 2010 at 04:57:25PM -0700, m...@freebsd.org wrote: > On Thu, Jul 29, 2010 at 4:39 PM, wrote: > > We've seen a few instances at work where witness_warn() in ast() > > indicates the sched lock is still held, but the place it claims it was > > held by is in fact sometimes not possible

Re: sched_pin() versus PCPU_GET

2010-07-29 Thread mdf
On Thu, Jul 29, 2010 at 4:39 PM, wrote: > We've seen a few instances at work where witness_warn() in ast() > indicates the sched lock is still held, but the place it claims it was > held by is in fact sometimes not possible to keep the lock, like: > >        thread_lock(td); >        td->td_flags

sched_pin() versus PCPU_GET

2010-07-29 Thread mdf
We've seen a few instances at work where witness_warn() in ast() indicates the sched lock is still held, but the place it claims it was held by is in fact sometimes not possible to keep the lock, like: thread_lock(td); td->td_flags &= ~TDF_SELECT; thread_unlock(td); What I