Re: svn commit: r202889 - head/sys/kern

2010-02-01 Thread Attilio Rao
2010/1/30 Marius Strobl : > On Sat, Jan 30, 2010 at 04:22:47PM +0100, Attilio Rao wrote: >> 2010/1/30 Marius Strobl : >> > >> > I think the idea behind using sched_lock in the sparc64 code is >> > to piggyback on it for protecting the pmap and take advantage of >> > the fact that it's held across c

Re: svn commit: r202889 - head/sys/kern

2010-01-30 Thread Marius Strobl
On Sat, Jan 30, 2010 at 04:22:47PM +0100, Attilio Rao wrote: > 2010/1/30 Marius Strobl : > > > > I think the idea behind using sched_lock in the sparc64 code is > > to piggyback on it for protecting the pmap and take advantage of > > the fact that it's held across cpu_switch() anyway. If that's > >

Re: svn commit: r202889 - head/sys/kern

2010-01-30 Thread Attilio Rao
2010/1/30 Marius Strobl : > On Thu, Jan 28, 2010 at 11:16:55AM +0100, Attilio Rao wrote: >> 2010/1/27 Marius Strobl : >> > On Tue, Jan 26, 2010 at 08:10:25AM +0100, Attilio Rao wrote: >> >> 2010/1/26 Rob Farmer : >> >> > On Sat, Jan 23, 2010 at 7:54 AM, Attilio Rao >> >> > wrote: >> >> >> Author:

Re: svn commit: r202889 - head/sys/kern

2010-01-30 Thread Marius Strobl
On Thu, Jan 28, 2010 at 11:16:55AM +0100, Attilio Rao wrote: > 2010/1/27 Marius Strobl : > > On Tue, Jan 26, 2010 at 08:10:25AM +0100, Attilio Rao wrote: > >> 2010/1/26 Rob Farmer : > >> > On Sat, Jan 23, 2010 at 7:54 AM, Attilio Rao wrote: > >> >> Author: attilio > >> >> Date: Sat Jan 23 15:54:21

Re: svn commit: r202889 - head/sys/kern

2010-01-28 Thread Attilio Rao
2010/1/27 Marius Strobl : > On Tue, Jan 26, 2010 at 08:10:25AM +0100, Attilio Rao wrote: >> 2010/1/26 Rob Farmer : >> > On Sat, Jan 23, 2010 at 7:54 AM, Attilio Rao wrote: >> >> Author: attilio >> >> Date: Sat Jan 23 15:54:21 2010 >> >> New Revision: 202889 >> >> URL: http://svn.freebsd.org/change

Re: svn commit: r202889 - head/sys/kern

2010-01-27 Thread Marius Strobl
On Tue, Jan 26, 2010 at 08:10:25AM +0100, Attilio Rao wrote: > 2010/1/26 Rob Farmer : > > On Sat, Jan 23, 2010 at 7:54 AM, Attilio Rao wrote: > >> Author: attilio > >> Date: Sat Jan 23 15:54:21 2010 > >> New Revision: 202889 > >> URL: http://svn.freebsd.org/changeset/base/202889 > >> > >> Log: > >

Re: svn commit: r202889 - head/sys/kern

2010-01-26 Thread John Baldwin
On Tuesday 26 January 2010 4:20:46 pm Attilio Rao wrote: > 2010/1/26 John Baldwin : > > On Tuesday 26 January 2010 3:09:32 pm M. Warner Losh wrote: > >> In message: > >> Marcel Moolenaar writes: > >> : Maybe what is in order right now is a description (using pseudo > >> : code if you

Re: svn commit: r202889 - head/sys/kern

2010-01-26 Thread Attilio Rao
2010/1/26 John Baldwin : > On Tuesday 26 January 2010 3:09:32 pm M. Warner Losh wrote: >> In message: >>             Marcel Moolenaar writes: >> : 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, whe

Re: svn commit: r202889 - head/sys/kern

2010-01-26 Thread John Baldwin
On Tuesday 26 January 2010 3:09:32 pm M. Warner Losh wrote: > In message: > Marcel Moolenaar writes: > : 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 ato

Re: svn commit: r202889 - head/sys/kern

2010-01-26 Thread M. Warner Losh
In message: <3023270a-755a-4bcf-ac9a-c1f290052...@mac.com> Marcel Moolenaar writes: : : On Jan 26, 2010, at 12:09 PM, M. Warner Losh wrote: : > cpu_switch(struct thread *old, struct thread *new, struct mutext *mtx) : > { : > /* Save the registers to the pcb */ : > old->td_lock

Re: svn commit: r202889 - head/sys/kern

2010-01-26 Thread Marcel Moolenaar
On Jan 26, 2010, at 12:09 PM, M. Warner Losh wrote: > cpu_switch(struct thread *old, struct thread *new, struct mutext *mtx) > { > /* Save the registers to the pcb */ > old->td_lock = mtx; > #if defined(SMP) && defined(SCHED_ULE) > /* s/long/int/ if sizeof(long) != sizeof(void *)

Re: svn commit: r202889 - head/sys/kern

2010-01-26 Thread M. Warner Losh
In message: Marcel Moolenaar writes: : : 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 ia

Re: svn commit: r202889 - head/sys/kern

2010-01-26 Thread Marcel Moolenaar
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

Re: svn commit: r202889 - head/sys/kern

2010-01-26 Thread John Baldwin
On Tuesday 26 January 2010 3:58:45 am Attilio Rao wrote: > Finally, I really don't think the BLOCK_SPIN() performance improvement > you suggest should really make a difference (assuming how rarely it > should happen) because, please note, that the cmpxchg is necessary as > we need to enforce a memo

Re: svn commit: r202889 - head/sys/kern

2010-01-26 Thread Attilio Rao
2010/1/26 Attilio Rao : > 2010/1/25 John Baldwin : >> On Saturday 23 January 2010 10:54:22 am Attilio Rao wrote: >>> Author: attilio >>> Date: Sat Jan 23 15:54:21 2010 >>> New Revision: 202889 >>> URL: http://svn.freebsd.org/changeset/base/202889 >>> >>> Log: >>>   - Fix a race in sched_switch() of

Re: svn commit: r202889 - head/sys/kern

2010-01-26 Thread Attilio Rao
2010/1/25 John Baldwin : > On Saturday 23 January 2010 10:54:22 am Attilio Rao wrote: >> Author: attilio >> Date: Sat Jan 23 15:54:21 2010 >> New Revision: 202889 >> URL: http://svn.freebsd.org/changeset/base/202889 >> >> Log: >>   - Fix a race in sched_switch() of sched_4bsd. >>     In the case of

Re: svn commit: r202889 - head/sys/kern

2010-01-25 Thread Attilio Rao
2010/1/26 Rob Farmer : > On Sat, Jan 23, 2010 at 7:54 AM, Attilio Rao wrote: >> Author: attilio >> Date: Sat Jan 23 15:54:21 2010 >> New Revision: 202889 >> URL: http://svn.freebsd.org/changeset/base/202889 >> >> Log: >>  - Fix a race in sched_switch() of sched_4bsd. >>    In the case of the threa

Re: svn commit: r202889 - head/sys/kern

2010-01-25 Thread Rob Farmer
On Sat, Jan 23, 2010 at 7:54 AM, Attilio Rao wrote: > Author: attilio > Date: Sat Jan 23 15:54:21 2010 > New Revision: 202889 > URL: http://svn.freebsd.org/changeset/base/202889 > > Log: >  - Fix a race in sched_switch() of sched_4bsd. >    In the case of the thread being on a sleepqueue or a turn

Re: svn commit: r202889 - head/sys/kern

2010-01-25 Thread John Baldwin
On Saturday 23 January 2010 10:54:22 am Attilio Rao wrote: > Author: attilio > Date: Sat Jan 23 15:54:21 2010 > New Revision: 202889 > URL: http://svn.freebsd.org/changeset/base/202889 > > Log: > - Fix a race in sched_switch() of sched_4bsd. > In the case of the thread being on a sleepqueue

svn commit: r202889 - head/sys/kern

2010-01-23 Thread Attilio Rao
Author: attilio Date: Sat Jan 23 15:54:21 2010 New Revision: 202889 URL: http://svn.freebsd.org/changeset/base/202889 Log: - Fix a race in sched_switch() of sched_4bsd. In the case of the thread being on a sleepqueue or a turnstile, the sched_lock was acquired (without the aid of the td_