Re: svn commit: r219646 - head/sys/x86/isa

2011-03-16 Thread Bruce Evans
On Tue, 15 Mar 2011, Jung-uk Kim wrote: On Tuesday 15 March 2011 02:13 pm, Bruce Evans wrote: On Tue, 15 Mar 2011, Jung-uk Kim wrote: ... I disagree. I think we should keep away from i8254 as much as possible. It is adequate for DELAY(), and is the only timer that is available on all x86.

Re: svn commit: r219646 - head/sys/x86/isa

2011-03-16 Thread Bruce Evans
On Tue, 15 Mar 2011, Jung-uk Kim wrote: On Tuesday 15 March 2011 03:51 pm, John Baldwin wrote: On Tuesday, March 15, 2011 3:26:11 pm Jung-uk Kim wrote: Now don't you think we should really kill delay by TSC? ;-) Delay by TSC fixed known deadlocks with the i8254 based DELAY() due to the use o

Re: svn commit: r219646 - head/sys/x86/isa

2011-03-15 Thread Kostik Belousov
On Tue, Mar 15, 2011 at 05:21:34PM -0400, Jung-uk Kim wrote: > However, why do we need cheaper DELAY() when we trying to "delay" > something with it? Busy-loop performing repeated access to the south bridge eats the bus capacity, that could be useful for other bus agent and other cores. I think th

Re: svn commit: r219646 - head/sys/x86/isa

2011-03-15 Thread Jung-uk Kim
On Tuesday 15 March 2011 03:51 pm, John Baldwin wrote: > On Tuesday, March 15, 2011 3:26:11 pm Jung-uk Kim wrote: > > Now don't you think we should really kill delay by TSC? ;-) > > Delay by TSC fixed known deadlocks with the i8254 based DELAY() due > to the use of locks. Be careful that you don't

Re: svn commit: r219646 - head/sys/x86/isa

2011-03-15 Thread John Baldwin
On Tuesday, March 15, 2011 3:26:11 pm Jung-uk Kim wrote: > Now don't you think we should really kill delay by TSC? ;-) Delay by TSC fixed known deadlocks with the i8254 based DELAY() due to the use of locks. Be careful that you don't re-introduce old bugs. Also, you can use a TSC for DELAY() in

Re: svn commit: r219646 - head/sys/x86/isa

2011-03-15 Thread Jung-uk Kim
On Tuesday 15 March 2011 02:13 pm, Bruce Evans wrote: > On Tue, 15 Mar 2011, Jung-uk Kim wrote: > > On Monday 14 March 2011 10:31 pm, Bruce Evans wrote: > >> On Mon, 14 Mar 2011, Jung-uk Kim wrote: > >>> Log: > >>> When TSC is unavailable, broken or disabled and the current > >>> timecounter has b

Re: svn commit: r219646 - head/sys/x86/isa

2011-03-15 Thread Bruce Evans
On Tue, 15 Mar 2011, Jung-uk Kim wrote: On Monday 14 March 2011 10:31 pm, Bruce Evans wrote: On Mon, 14 Mar 2011, Jung-uk Kim wrote: Log: When TSC is unavailable, broken or disabled and the current timecounter has better quality than i8254 timer, use it for DELAY(9). You cannot use a random

Re: svn commit: r219646 - head/sys/x86/isa

2011-03-15 Thread Jung-uk Kim
On Monday 14 March 2011 10:31 pm, Bruce Evans wrote: > On Mon, 14 Mar 2011, Jung-uk Kim wrote: > > Log: > > When TSC is unavailable, broken or disabled and the current > > timecounter has better quality than i8254 timer, use it for > > DELAY(9). > > You cannot use a random timecounter for DELAY().

Re: svn commit: r219646 - head/sys/x86/isa

2011-03-14 Thread Bruce Evans
On Mon, 14 Mar 2011, Jung-uk Kim wrote: Log: When TSC is unavailable, broken or disabled and the current timecounter has better quality than i8254 timer, use it for DELAY(9). You cannot use a random timecounter for DELAY(). DELAY() is carefully written to not use any locks, so that it doesn

svn commit: r219646 - head/sys/x86/isa

2011-03-14 Thread Jung-uk Kim
Author: jkim Date: Mon Mar 14 22:05:59 2011 New Revision: 219646 URL: http://svn.freebsd.org/changeset/base/219646 Log: When TSC is unavailable, broken or disabled and the current timecounter has better quality than i8254 timer, use it for DELAY(9). Modified: head/sys/x86/isa/clock.c Modif