Bug about sched_4bsd?

Attilio Rao attilio at freebsd.org
Thu Jan 21 22:49:24 UTC 2010


2010/1/20 Giovanni Trematerra <giovanni.trematerra at gmail.com>:
> On Mon, Jan 18, 2010 at 3:58 AM, Attilio Rao <attilio at freebsd.org> wrote:
>> 2010/1/17 Kohji Okuno <okuno.kohji at jp.panasonic.com>:
>>> Hello,
>>>
>>> Could you check sched_4bsd.patch, please?
>>
>> I think, instead, that what needs to happen is to have sched_switch()
>> to do a lock handover from sleepq/turnstile spinlock to schedlock.
>> That way, if threads are willing to contest on td_lock they will be
>> still inhibited.
>> I'm not sure if this patch breaks any invariant, if you may test I
>> would appreciate:
>> http://www.freebsd.org/~attilio/sched_4bsd_schedlock.diff
>
> I stressed an 8-core machine with pho's stress2 kernel stress suite and
> your patch seems to break the invariant THREAD_LOCKPTR_ASSERT in
> turnstile_claim:subr_turnstile.c

Oh, right, I guess what we really want is to block the td_lock.
This is the new patch:
http://www.freebsd.org/~attilio/sched_4bsd_schedlock2.diff

Thanks a lot for your testing, it is much appreciated.

Attilio


-- 
Peace can only be achieved by understanding - A. Einstein


More information about the freebsd-current mailing list