Date: Thu, 21 Jan 2010 23:49:23 +0100 From: Attilio Rao <attilio@freebsd.org> To: Giovanni Trematerra <giovanni.trematerra@gmail.com> Cc: Jeff Roberson <jroberson@jroberson.net>, freebsd-current@freebsd.org, Kohji Okuno <okuno.kohji@jp.panasonic.com> Subject: Re: Bug about sched_4bsd? Message-ID: <3bbf2fe11001211449je30b643y53fe0830bcbf3e5d@mail.gmail.com> In-Reply-To: <4e6cba831001192332j1e23bb1chdf2f47664d3cb14a@mail.gmail.com> References: <20100117.142200.321689433999177718.okuno.kohji@jp.panasonic.com> <20100117.152835.119882392487126976.okuno.kohji@jp.panasonic.com> <3bbf2fe11001171858o4568fe38l9b2db54ec9856b50@mail.gmail.com> <4e6cba831001192332j1e23bb1chdf2f47664d3cb14a@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
2010/1/20 Giovanni Trematerra <giovanni.trematerra@gmail.com>: > On Mon, Jan 18, 2010 at 3:58 AM, Attilio Rao <attilio@freebsd.org> wrote: >> 2010/1/17 Kohji Okuno <okuno.kohji@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3bbf2fe11001211449je30b643y53fe0830bcbf3e5d>