Re: Bug about sched_4bsd?

From: Attilio Rao <attilio_at_freebsd.org>
Date: Thu, 21 Jan 2010 23:49:23 +0100
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
Received on Thu Jan 21 2010 - 21:49:24 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:00 UTC