2010/1/21 Attilio Rao <attilio_at_freebsd.org>: > 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 FYI, I've updated the patch with a more correct use of thread_lock_block() and a merge of this interface with the custom interface of thread_block_switch() from ULE. The overall result should be better (and more correct). Please refresh your patch. Testing with ULE should be due as well. Thanks, Attilio -- Peace can only be achieved by understanding - A. EinsteinReceived on Thu Jan 21 2010 - 22:26:55 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:00 UTC