From owner-freebsd-current@freebsd.org Fri Jan 13 00:26:36 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A22ECADEEA for ; Fri, 13 Jan 2017 00:26:36 +0000 (UTC) (envelope-from jiashiun@gmail.com) Received: from mail-qt0-x22c.google.com (mail-qt0-x22c.google.com [IPv6:2607:f8b0:400d:c0d::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BCCA0137D for ; Fri, 13 Jan 2017 00:26:35 +0000 (UTC) (envelope-from jiashiun@gmail.com) Received: by mail-qt0-x22c.google.com with SMTP id x49so34082284qtc.2 for ; Thu, 12 Jan 2017 16:26:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=j+JGI5ij58XVfkXbknYeubvYU7jGFvLlCk+J9uPgQaU=; b=bYUmui8mEFAte/JGBxWiaM2bdjinQ1MI+cNiyZrec0zZicr1yBhNfeUVgNW3K8cUav 0/a27QK5BF/C0r92mR5oHTRRqRCijZRtwitEWDQB5wZMnZYv9woz4BNBMFjNlE+XoUkk VzP5ERb32MxjfTHJQGm/9tP9E8Er3DV+BmVRg4/MYOIu74//9QZYNxPmvwmceKmq4PK4 fW2jM5iEd/DpsAUemC8C7Scq0aWL5pBVlLYP43DkJdg0XHPxTsRft8/XeU1XrAkuuTE7 eLv2Ps3PCNaO6Fw29EhWogsjG3QUVt27YvjAPCQZPJgO/LlACx+LBl/uzerLGAfQAS5V bCTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=j+JGI5ij58XVfkXbknYeubvYU7jGFvLlCk+J9uPgQaU=; b=dJsmOMJKa+1ae0h188cEGyAZbzEtLhEsidsoESTf/dJZPQQP/y9vYhyF5f25g+lBAI nFzuOmT7mIYyZrU/lYDt+AZyme83mcbEdJ2ScbtmN4ensjc7q97rbQ+Eg8Cj63b8hZZB XrZQAwfVKiIWyAQsaf41SXt0RgjLxXNfpxFH22MvaXcxZlPtTEhzlqWn3j7JdKbclSna Y9JKJWx6/QnMQjz1cGHO17aFQWDm8Ez7lUNzRa0MJoZhKRnZq1V9VY/2evBX72zMHINm qh1/cS/ABflD8J1K6qrtBRDXh7/bOb2OSFET8ZwuYppGFMdTo/65tJ8IB/nh26Vd4M3w 8GGQ== X-Gm-Message-State: AIkVDXIJ/izYBiKXUTQ6dLE6GXX/ZNUwX1tGQVEzOzFLfjuI+pmInX/7z7e0NPvl95THsv73X97PIMXBRu7urA== X-Received: by 10.237.60.27 with SMTP id t27mr17175302qte.86.1484267194722; Thu, 12 Jan 2017 16:26:34 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.104.8 with HTTP; Thu, 12 Jan 2017 16:26:04 -0800 (PST) From: Jia-Shiun Li Date: Fri, 13 Jan 2017 08:26:04 +0800 Message-ID: Subject: TSC as timecounter makes system lag To: freebsd-current Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 00:26:36 -0000 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 system time is slow, I tried to change timecounter from default TSC to HPET. And it resumed normal immediately. The same world binary works fine on other Ivybridge and Haswell desktops, so I assume this may be related to CPU or mainboard generations. version is FreeBSD jsli-nb 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r311687: Mon Jan 9 04:07:27 CST 2017 jsli@4cbsd:/personal/freebsd/obj/x64/personal/freebsd/fbsdsrc/sys/MINIMAL-NODEBUG amd64 and CPU is CPU: Pentium(R) Dual-Core CPU T4200 @ 2.00GHz (1995.04-MHz K8-class CPU) Origin="GenuineIntel" Id=0x1067a Family=0x6 Model=0x17 Stepping=10 Features=0xbfebfbff Features2=0xc00e39d AMD Features=0x20100800 AMD Features2=0x1 TSC: P-state invariant, performance statistics Tested similar OS rev on another Intel Core 2 Duo E7400 Wolfdale (the same generation as the Pentium T4200). The same lag also happens on it. BTW on both system, cpuX:timer interrupts do not fire at all and count remains 0. -Jia-Shiun