Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Jan 2017 15:05:30 +0100
From:      Hans Petter Selasky <hps@selasky.org>
To:        Jia-Shiun Li <jiashiun@gmail.com>, Konstantin Belousov <kostikbel@gmail.com>
Cc:        freebsd-current <freebsd-current@freebsd.org>
Subject:   Re: TSC as timecounter makes system lag
Message-ID:  <5f814a7a-5e46-057e-62ad-dde0a61bc1c8@selasky.org>
In-Reply-To: <CAHNYxxO7jeMFCkzQy-J2odu1yZS2UMO36kS58AQAUkXAHqVCPg@mail.gmail.com>
References:  <CAHNYxxPy4K37jKzw0%2Bs_AX8ha9yeB_S3dK46s4EuXjdNbULCmQ@mail.gmail.com> <20170113120534.GC2349@kib.kiev.ua> <CAHNYxxNN3p4KGvAnQ0aYUFmucGBKKj4JWgATNYZS2n0WTMY78g@mail.gmail.com> <20170115202008.GL2349@kib.kiev.ua> <CAHNYxxNxJp6jVmS0petqMmhdMe0Bam%2BtgUzufFVYWnSSxeGxoA@mail.gmail.com> <20170116120021.GQ2349@kib.kiev.ua> <CAHNYxxO7jeMFCkzQy-J2odu1yZS2UMO36kS58AQAUkXAHqVCPg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------3184C88B78335154B7680934
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit

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, when the keystroke did 
not repeat smoothly.

--HPS

--------------3184C88B78335154B7680934
Content-Type: text/x-patch;
 name="timer_init_fix.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="timer_init_fix.diff"

diff --git a/sys/kern/kern_clocksource.c b/sys/kern/kern_clocksource.c
index 7f7769d..454a130 100644
--- a/sys/kern/kern_clocksource.c
+++ b/sys/kern/kern_clocksource.c
@@ -511,7 +511,7 @@ configtimer(int start)
 			state->nexthard = next;
 			state->nextstat = next;
 			state->nextprof = next;
-			state->nextcall = next;
+			state->nextcall = SBT_MAX;
 			state->nextcallopt = next;
 			hardclock_sync(cpu);
 		}

--------------3184C88B78335154B7680934--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5f814a7a-5e46-057e-62ad-dde0a61bc1c8>