Date: Tue, 26 Jan 2010 10:39:57 -0800 From: Marcel Moolenaar <xcllnt@mac.com> To: Attilio Rao <attilio@FreeBSD.org> Cc: src-committers@freebsd.org, John Baldwin <jhb@freebsd.org>, svn-src-all@freebsd.org, Marcel Moolenaar <marcel@freebsd.org>, svn-src-head@freebsd.org, Warner Losh <imp@freebsd.org> Subject: Re: svn commit: r202889 - head/sys/kern Message-ID: <C6A8F7A7-F0A9-4F63-B61E-DDC5332DC495@mac.com> In-Reply-To: <3bbf2fe11001260339u7a694069m6a2bb7e18b2c546a@mail.gmail.com> References: <201001231554.o0NFsMbx049837@svn.freebsd.org> <201001251456.32459.jhb@freebsd.org> <3bbf2fe11001260058i65604619l664bd0e49c1dbbd@mail.gmail.com> <3bbf2fe11001260339u7a694069m6a2bb7e18b2c546a@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Jan 26, 2010, at 3:39 AM, Attilio Rao wrote: >>> >>> Does this affect the various #ifdef's for handling the third argument to >>> cpu_switch()? E.g. does 4BSD need to spin if td_lock is &blocked_lock? >>> > > I think that ia64 is broken on that regard because it does use simple > operation while it should use correct atomic and memory barriers > (CC'ed marcel@ for that). Ok, so cpu_switch() handles the 3rd argument (the mutex) only when SCHED_ULE and SMP are defined, even on i386. Maybe it's just me, but if SCHED_4BSD now also uses the 3rd argument then all implementations of cpu_switch() are broken, right? Maybe what is in order right now is a description (using pseudo code if you like) of what exactly needs to happen with the 3rd argument, when and how (i.e. what must be atomic and what does not have to be atomic). I can deal with ia64 and powerpc once I know for certain what exactly needs to happen, because it seems to me that I can't really look at the i386 implementation and infer what needs to happen. Thanks, -- Marcel Moolenaar xcllnt@mac.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C6A8F7A7-F0A9-4F63-B61E-DDC5332DC495>