Re: TSC as timecounter makes system lag

2017-02-24 Thread John Baldwin
On Friday, February 24, 2017 10:50:19 PM Jia-Shiun Li wrote: > On Fri, Feb 24, 2017 at 9:32 PM, Jia-Shiun Li wrote: > > > On Fri, Feb 24, 2017 at 7:45 PM, Konstantin Belousov > > wrote: > > > >> On Fri, Feb 24, 2017 at 12:15:26PM +0800, Jia-Shiun Li wrote: > >> > Tested working on E7400 against

Re: TSC as timecounter makes system lag

2017-02-24 Thread Jia-Shiun Li
On Fri, Feb 24, 2017 at 9:32 PM, Jia-Shiun Li wrote: > On Fri, Feb 24, 2017 at 7:45 PM, Konstantin Belousov > wrote: > >> On Fri, Feb 24, 2017 at 12:15:26PM +0800, Jia-Shiun Li wrote: >> > Tested working on E7400 against r313909. And changing timecounter >> from/to >> > TSC >> > correctly enable

Re: TSC as timecounter makes system lag

2017-02-24 Thread Jia-Shiun Li
On Fri, Feb 24, 2017 at 7:45 PM, Konstantin Belousov wrote: > On Fri, Feb 24, 2017 at 12:15:26PM +0800, Jia-Shiun Li wrote: > > Tested working on E7400 against r313909. And changing timecounter from/to > > TSC > > correctly enables/disables C2. > > > > The latter part cpu_disable_c2_sleep++ is no

Re: TSC as timecounter makes system lag

2017-02-24 Thread Konstantin Belousov
On Fri, Feb 24, 2017 at 12:15:26PM +0800, Jia-Shiun Li wrote: > On Fri, Feb 24, 2017 at 12:55 AM, John Baldwin wrote: > > > On Thursday, February 23, 2017 11:04:58 PM Jia-Shiun Li wrote: > > > > > > > > > This does not work. > > > > > > I added a printf before the outer if clause, and it says > >

Re: TSC as timecounter makes system lag

2017-02-23 Thread Jia-Shiun Li
On Fri, Feb 24, 2017 at 12:55 AM, John Baldwin wrote: > On Thursday, February 23, 2017 11:04:58 PM Jia-Shiun Li wrote: > > > > > > This does not work. > > > > I added a printf before the outer if clause, and it says > > > > init_TSC_tc:546: deepest vendor 8086 amd_pminfo > >

Re: TSC as timecounter makes system lag

2017-02-23 Thread John Baldwin
On Thursday, February 23, 2017 11:04:58 PM Jia-Shiun Li wrote: > On Thu, Feb 23, 2017 at 6:08 PM, Konstantin Belousov > wrote: > > > > > This is a useful analysis. > > > > Yes, I think that there is an init ordering issue. Note that > > cpu_disable_c2_sleep is only changed in tc_windup() when tim

Re: TSC as timecounter makes system lag

2017-02-23 Thread Jia-Shiun Li
On Thu, Feb 23, 2017 at 6:08 PM, Konstantin Belousov wrote: > > This is a useful analysis. > > Yes, I think that there is an init ordering issue. Note that > cpu_disable_c2_sleep is only changed in tc_windup() when timecounter > is changed. If existing and already engadged timecounter suddenly ge

Re: TSC as timecounter makes system lag

2017-02-23 Thread Konstantin Belousov
On Thu, Feb 23, 2017 at 01:11:29AM +0800, Jia-Shiun Li wrote: > I got the impression that TSC was not preferred timecounter > if it is not C-state invariant. But this apparenly is not the case now. > Dig a bit and found r277900 chose to prefer TSC over saving power > by disabling C2 state when TSC

Re: TSC as timecounter makes system lag

2017-02-22 Thread Jia-Shiun Li
I got the impression that TSC was not preferred timecounter if it is not C-state invariant. But this apparenly is not the case now. Dig a bit and found r277900 chose to prefer TSC over saving power by disabling C2 state when TSC is selected as timecounter. But with EARLY_AP_STARTUP, and TSC as tim

Re: TSC as timecounter makes system lag

2017-02-05 Thread Jia-Shiun Li
FYI since it was not really solved as of r313090, I created bug 216833 to keep track of it. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216833 -Jia-Shiun. ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freeb

Re: TSC as timecounter makes system lag

2017-01-20 Thread Hans Petter Selasky
FYI: https://svnweb.freebsd.org/changeset/base/312551 --HPS ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Re: TSC as timecounter makes system lag

2017-01-17 Thread Jia-Shiun Li
On Tue, Jan 17, 2017 at 10:05 PM, Hans Petter Selasky wrote: > I've seen something similar. Does the attached patch make any difference? > > Can you dump: > > vmstat -i > > Just after boot w/ and w/o the attached patch, when the keystroke did not > repeat smoothly. > > Your patch fixes this issue

Re: TSC as timecounter makes system lag

2017-01-17 Thread Hans Petter Selasky
On 01/16/17 15:34, Jia-Shiun Li wrote: Yes. I noticed this because systat refreshes looked slower, and keystroke did not repeat smoothly for 30/s. I've seen something similar. Does the attached patch make any difference? Can you dump: vmstat -i Just after boot w/ and w/o the attached patch,

Re: TSC as timecounter makes system lag

2017-01-16 Thread Jia-Shiun Li
On Mon, Jan 16, 2017 at 8:00 PM, Konstantin Belousov wrote: > On Mon, Jan 16, 2017 at 12:28:54PM +0800, Jia-Shiun Li wrote: > > BTW please see my other mail of this thread. It seems to be related to > > EARLY_AP_STARTUP option. > Yes, I noted, I might have an idea, but the report that changing th

Re: TSC as timecounter makes system lag

2017-01-16 Thread Konstantin Belousov
On Mon, Jan 16, 2017 at 12:28:54PM +0800, Jia-Shiun Li wrote: > BTW please see my other mail of this thread. It seems to be related to > EARLY_AP_STARTUP option. Yes, I noted, I might have an idea, but the report that changing the timecounter makes the lags go away still does not fit into my unders

Re: TSC as timecounter makes system lag

2017-01-15 Thread Jia-Shiun Li
BTW please see my other mail of this thread. It seems to be related to EARLY_AP_STARTUP option. On Mon, Jan 16, 2017 at 4:20 AM, Konstantin Belousov wrote: > I still do not understand. Is the sysctl output below from the pristine > boot where no timecounter/eventtimer reconfiguration were done

Re: TSC as timecounter makes system lag

2017-01-15 Thread Konstantin Belousov
On Sun, Jan 15, 2017 at 10:35:26PM +0800, Jia-Shiun Li wrote: > Sorry just saw this. Bad Gmail. > > > On Fri, Jan 13, 2017 at 8:05 PM, Konstantin Belousov > wrote: > > > On Fri, Jan 13, 2017 at 08:26:04AM +0800, Jia-Shiun Li wrote: > > > Hi all, > > > > > > since 2 or 3 weeks ago, I noticed tha

Re: TSC as timecounter makes system lag [-> jhb]

2017-01-15 Thread Larry Rosenman
On 2017-01-14 23:03, Julian Elischer wrote: On 15/01/2017 10:11 AM, Jia-Shiun Li wrote: On Fri, Jan 13, 2017 at 8:26 AM, Jia-Shiun Li wrote: Hi all, since 2 or 3 weeks ago, I noticed that my old Penryn-based Intel Pentium T4200 notebook lagged a lot. System time was running a lot slower,

Re: TSC as timecounter makes system lag

2017-01-15 Thread Jia-Shiun Li
Sorry just saw this. Bad Gmail. On Fri, Jan 13, 2017 at 8:05 PM, Konstantin Belousov wrote: > On Fri, Jan 13, 2017 at 08:26:04AM +0800, Jia-Shiun Li wrote: > > Hi all, > > > > since 2 or 3 weeks ago, I noticed that my old Penryn-based Intel Pentium > > T4200 notebook lagged a lot. System time w

Re: TSC as timecounter makes system lag [-> jhb]

2017-01-14 Thread Julian Elischer
On 15/01/2017 10:11 AM, Jia-Shiun Li wrote: On Fri, Jan 13, 2017 at 8:26 AM, Jia-Shiun Li wrote: Hi all, since 2 or 3 weeks ago, I noticed that my old Penryn-based Intel Pentium T4200 notebook lagged a lot. System time was running a lot slower, sometimes even looked like it freezed. Keystroke

Re: TSC as timecounter makes system lag

2017-01-14 Thread Jia-Shiun Li
On Fri, Jan 13, 2017 at 8:26 AM, Jia-Shiun Li wrote: > Hi all, > > since 2 or 3 weeks ago, I noticed that my old Penryn-based Intel Pentium > T4200 notebook lagged a lot. System time was running a lot slower, > sometimes even looked like it freezed. Keystroke repeat rate was slow too. > > Since s

Re: TSC as timecounter makes system lag

2017-01-13 Thread Konstantin Belousov
On Fri, Jan 13, 2017 at 08:26:04AM +0800, Jia-Shiun Li wrote: > Hi all, > > since 2 or 3 weeks ago, I noticed that my old Penryn-based Intel Pentium > T4200 notebook lagged a lot. System time was running a lot slower, > sometimes even looked like it freezed. Keystroke repeat rate was slow too. >