Re: One-shot-oriented event timers management

2010-09-07 Thread Kevin Oberman
> From: Ian FREISLICH > Date: Tue, 07 Sep 2010 13:40:33 +0200 > Sender: owner-freebsd-curr...@freebsd.org > > Peter Jeremy wrote: > > On 2010-Sep-02 13:08:25 +0200, Ian FREISLICH wrote: > > >It's a compaq mini-110: > > >CPU: Intel(R) Atom(TM) CPU N270 @ 1.60GHz (1596.22-MHz 686-class CPU) > >

Re: One-shot-oriented event timers management

2010-09-07 Thread Ian FREISLICH
Peter Jeremy wrote: > On 2010-Sep-02 13:08:25 +0200, Ian FREISLICH wrote: > >It's a compaq mini-110: > >CPU: Intel(R) Atom(TM) CPU N270 @ 1.60GHz (1596.22-MHz 686-class CPU) > > Hmmm... I have a N270 in an Aspire One. > > >dev.cpu.0.freq_levels: 1600/25000 1400/21875 1333/18000 1166/15750 1067

Re: One-shot-oriented event timers management

2010-09-07 Thread Peter Jeremy
On 2010-Sep-02 13:08:25 +0200, Ian FREISLICH wrote: >It's a compaq mini-110: >CPU: Intel(R) Atom(TM) CPU N270 @ 1.60GHz (1596.22-MHz 686-class CPU) Hmmm... I have a N270 in an Aspire One. >dev.cpu.0.freq_levels: 1600/25000 1400/21875 1333/18000 1166/15750 1067/11000 >933/9625 800/5000 700/437

Re: One-shot-oriented event timers management

2010-09-02 Thread Alexander Motin
b. f. wrote: > In: > http://people.freebsd.org/~mav/timers_oneshot7.patch > > you need to offset the declaration of 'cpu' in getnextevent() on line > 256 of src/sys/kern/kern_clocksource.c by #ifdef SMP, because it is > not used otherwise, and will break UP kernel builds with our default > warning

Re: One-shot-oriented event timers management

2010-09-02 Thread b. f.
In: http://people.freebsd.org/~mav/timers_oneshot7.patch you need to offset the declaration of 'cpu' in getnextevent() on line 256 of src/sys/kern/kern_clocksource.c by #ifdef SMP, because it is not used otherwise, and will break UP kernel builds with our default warnings and -Werror. Incidental

Re: One-shot-oriented event timers management

2010-09-02 Thread Ian FREISLICH
Alexander Motin wrote: > Ian FREISLICH wrote: > > On Wed, Sep 1, 2010 at 2:16 PM, Alexander Motin wrote: > >> Brandon Gooch wrote: > >>> This latest patch causes an interrupt storm with the HPET timer on my > >>> system. The machine took about 8 minutes to boot and bring me to a > >>> login prompt

Re: One-shot-oriented event timers management

2010-09-02 Thread Alexander Motin
Ian FREISLICH wrote: > On Wed, Sep 1, 2010 at 2:16 PM, Alexander Motin wrote: >> Brandon Gooch wrote: >>> This latest patch causes an interrupt storm with the HPET timer on my >>> system. The machine took about 8 minutes to boot and bring me to a >>> login prompt. System interactivity (i.e. input

Re: One-shot-oriented event timers management

2010-09-02 Thread Ian FREISLICH
On Wed, Sep 1, 2010 at 2:16 PM, Alexander Motin wrote: > Brandon Gooch wrote: >> This latest patch causes an interrupt storm with the HPET timer on my >> system. The machine took about 8 minutes to boot and bring me to a >> login prompt. System interactivity (i.e. input from keyboard, output >> on

Re: One-shot-oriented event timers management

2010-09-01 Thread Brandon Gooch
On Wed, Sep 1, 2010 at 2:16 PM, Alexander Motin wrote: > Brandon Gooch wrote: >> This latest patch causes an interrupt storm with the HPET timer on my >> system. The machine took about 8 minutes to boot and bring me to a >> login prompt. System interactivity (i.e. input from keyboard, output >> on

Re: One-shot-oriented event timers management

2010-09-01 Thread Alexander Motin
Brandon Gooch wrote: > This latest patch causes an interrupt storm with the HPET timer on my > system. The machine took about 8 minutes to boot and bring me to a > login prompt. System interactivity (i.e. input from keyboard, output > on console) was fine, but after checking the output of `systat v

Re: One-shot-oriented event timers management

2010-09-01 Thread Brandon Gooch
On Wed, Sep 1, 2010 at 5:44 AM, Alexander Motin wrote: > Alexander Motin wrote: >> Gary Jennejohn wrote: >>> On Mon, 30 Aug 2010 12:11:48 +0200 >>> OK, this is purely anecdotal, but I'll report it anyway. >>> >>> I was running pretty much all day with the patched kernel and things >>> seemed to be

Re: One-shot-oriented event timers management

2010-09-01 Thread Alexander Motin
Gary Jennejohn wrote: > On Wed, 1 Sep 2010 14:15:41 +0200 > Gary Jennejohn wrote: > >> On Wed, 01 Sep 2010 13:44:26 +0300 >> Alexander Motin wrote: >>> Updated patch: http://people.freebsd.org/~mav/timers_oneshot6.patch >>> >>> Patch also includes some optimizations to reduce lock contention. >>

Re: One-shot-oriented event timers management

2010-09-01 Thread Gary Jennejohn
On Wed, 1 Sep 2010 14:15:41 +0200 Gary Jennejohn wrote: > On Wed, 01 Sep 2010 13:44:26 +0300 > Alexander Motin wrote: > > Updated patch: http://people.freebsd.org/~mav/timers_oneshot6.patch > > > > Patch also includes some optimizations to reduce lock contention. > > > > Thanks for testing. >

Re: One-shot-oriented event timers management

2010-09-01 Thread Alexander Motin
Alexander Leidinger wrote: > Quoting Alexander Motin (from Sun, 29 Aug 2010 > 16:10:00 +0300): > >> I have actively tested this code for a few days on my amd64 Core2Duo >> laptop and i386 Core-i5 desktop system. With C2/C3 states enabled >> systems experience only about 100-150 interrupts per sec

Re: One-shot-oriented event timers management

2010-09-01 Thread Alexander Leidinger
Quoting Alexander Motin (from Sun, 29 Aug 2010 16:10:00 +0300): I have actively tested this code for a few days on my amd64 Core2Duo laptop and i386 Core-i5 desktop system. With C2/C3 states enabled systems experience only about 100-150 interrupts per second, having HZ set to 1000. These even

Re: One-shot-oriented event timers management

2010-09-01 Thread Alexander Motin
Gary Jennejohn wrote: > On Wed, 01 Sep 2010 13:44:26 +0300 > Alexander Motin wrote: >> I have reproduced the problem locally. It happens more often when ticks >> are not stopped on idle, like in your original case (or if explicitly >> enabled by kern.eventtimer.idletick sysctl). >> >> I've made so

Re: One-shot-oriented event timers management

2010-09-01 Thread Gary Jennejohn
On Wed, 01 Sep 2010 13:44:26 +0300 Alexander Motin wrote: > Alexander Motin wrote: > > Gary Jennejohn wrote: > >> On Mon, 30 Aug 2010 12:11:48 +0200 > >> OK, this is purely anecdotal, but I'll report it anyway. > >> > >> I was running pretty much all day with the patched kernel and things > >> se

Re: One-shot-oriented event timers management

2010-09-01 Thread Alexander Motin
Alexander Motin wrote: > Gary Jennejohn wrote: >> On Mon, 30 Aug 2010 12:11:48 +0200 >> OK, this is purely anecdotal, but I'll report it anyway. >> >> I was running pretty much all day with the patched kernel and things >> seemed to be working quite well. >> >> Then, after about 7 hours, everything

Re: One-shot-oriented event timers management

2010-09-01 Thread Gary Jennejohn
On Wed, 01 Sep 2010 00:27:36 +0300 Alexander Motin wrote: > Gary Jennejohn wrote: > > On Mon, 30 Aug 2010 13:07:38 +0300 > > Alexander Motin wrote: > >> Yes, as I have said, at this moment empty ticks skipped only while CPU > >> is in C2/C3 states. In C1 state there is no way to handle lost even

Re: One-shot-oriented event timers management

2010-08-31 Thread Alexander Motin
Gary Jennejohn wrote: > On Mon, 30 Aug 2010 13:07:38 +0300 > Alexander Motin wrote: >> Yes, as I have said, at this moment empty ticks skipped only while CPU >> is in C2/C3 states. In C1 state there is no way to handle lost events on >> wake up. While it may be not very dangerous, it is not very g

Re: One-shot-oriented event timers management

2010-08-31 Thread Brandon Gooch
On Tue, Aug 31, 2010 at 3:48 AM, Alexander Motin wrote: > Gary Jennejohn wrote: >> On Mon, 30 Aug 2010 12:11:48 +0200 >> Gary Jennejohn wrote: >> >>> On Mon, 30 Aug 2010 13:07:38 +0300 >>> Alexander Motin wrote: >>> Gary Jennejohn wrote: > Hmm.  I applied your patches and am now running

Re: One-shot-oriented event timers management

2010-08-31 Thread Alexander Motin
Gary Jennejohn wrote: > On Mon, 30 Aug 2010 12:11:48 +0200 > Gary Jennejohn wrote: > >> On Mon, 30 Aug 2010 13:07:38 +0300 >> Alexander Motin wrote: >> >>> Gary Jennejohn wrote: Hmm. I applied your patches and am now running the new kernel. But I only installed the new kernel and did

Re: One-shot-oriented event timers management

2010-08-31 Thread Gary Jennejohn
On Mon, 30 Aug 2010 12:11:48 +0200 Gary Jennejohn wrote: > On Mon, 30 Aug 2010 13:07:38 +0300 > Alexander Motin wrote: > > > Gary Jennejohn wrote: > > > Hmm. I applied your patches and am now running the new kernel. But I > > > only installed the new kernel and didn't do make buildworld insta

Re: One-shot-oriented event timers management

2010-08-31 Thread Alexander Motin
Alexander Motin wrote: > YAMAMOTO, Taku wrote: >> On Mon, 30 Aug 2010 13:07:38 +0300 >> Alexander Motin wrote: >>> Gary Jennejohn wrote: >> (snip) So, what else did you do to reduce interrupts so much? Ah, I think I see it now. My desktop has only C1 enabled. Is that it? Unfo

Re: One-shot-oriented event timers management

2010-08-30 Thread Alexander Motin
YAMAMOTO, Taku wrote: > On Mon, 30 Aug 2010 13:07:38 +0300 > Alexander Motin wrote: >> Gary Jennejohn wrote: > (snip) >>> So, what else did you do to reduce interrupts so much? >>> >>> Ah, I think I see it now. My desktop has only C1 enabled. Is that it? >>> Unfortunately, it appears that only C

Re: One-shot-oriented event timers management

2010-08-30 Thread YAMAMOTO, Taku
On Mon, 30 Aug 2010 13:07:38 +0300 Alexander Motin wrote: > Gary Jennejohn wrote: (snip) > > So, what else did you do to reduce interrupts so much? > > > > Ah, I think I see it now. My desktop has only C1 enabled. Is that it? > > Unfortunately, it appears that only C1 is supported :( > > Yes,

Re: One-shot-oriented event timers management

2010-08-30 Thread Alexander Motin
Gary Jennejohn wrote: > On Mon, 30 Aug 2010 13:07:38 +0300 > Alexander Motin wrote: >> Gary Jennejohn wrote: >>> Ah, I think I see it now. My desktop has only C1 enabled. Is that it? >>> Unfortunately, it appears that only C1 is supported :( >> Yes, as I have said, at this moment empty ticks ski

Re: One-shot-oriented event timers management

2010-08-30 Thread Gary Jennejohn
On Mon, 30 Aug 2010 13:07:38 +0300 Alexander Motin wrote: > Gary Jennejohn wrote: > > Hmm. I applied your patches and am now running the new kernel. But I > > only installed the new kernel and didn't do make buildworld installworld. > > > > Mu systat -vm 1 doesn't look anything like yours. I'

Re: One-shot-oriented event timers management

2010-08-30 Thread Alexander Motin
Gary Jennejohn wrote: > Hmm. I applied your patches and am now running the new kernel. But I > only installed the new kernel and didn't do make buildworld installworld. > > Mu systat -vm 1 doesn't look anything like yours. I'm seeing about 2300 > interrupts per second and most of those are comi

Re: One-shot-oriented event timers management

2010-08-30 Thread Gary Jennejohn
On Sun, 29 Aug 2010 16:10:00 +0300 Alexander Motin wrote: > I have actively tested this code for a few days on my amd64 Core2Duo > laptop and i386 Core-i5 desktop system. With C2/C3 states enabled > systems experience only about 100-150 interrupts per second, having HZ > set to 1000. These events

Re: One-shot-oriented event timers management

2010-08-30 Thread Alexander Motin
Brandon Gooch wrote: > One thing I see: > > Where is *frame pointing to? It isn't initialized in the function, so... Thanks! Fixed. Patch updated. > Also, for those of us testing, should we "reset" our timer settings > back to defaults and work from there[1] (meaning, should we be futzing > arou

Re: One-shot-oriented event timers management

2010-08-29 Thread Brandon Gooch
2010/8/29 Alexander Motin : > Hi. > > I would like to present my new work on timers management code. > > In my previous work I was mostly orienting on reimplementing existing > functionality in better way. The result seemed not bad, but after > looking on perspectives of using event timers in one-s

One-shot-oriented event timers management

2010-08-29 Thread Alexander Motin
Hi. I would like to present my new work on timers management code. In my previous work I was mostly orienting on reimplementing existing functionality in better way. The result seemed not bad, but after looking on perspectives of using event timers in one-shot (aperiodic) mode I've understood tha