Received: by 10.223.164.202 with SMTP id h10csp262990wrb; Thu, 9 Nov 2017 06:04:20 -0800 (PST) X-Google-Smtp-Source: ABhQp+SjWsuLTfkMtfhAk3arjGoZNJqo6gvQl/Yd1fEBFEr1d8a/j8VEE0q4NafzaSFuVufiuLg5 X-Received: by 10.84.241.142 with SMTP id b14mr579486pll.352.1510236260585; Thu, 09 Nov 2017 06:04:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510236260; cv=none; d=google.com; s=arc-20160816; b=DWn6B/2gi4Q0l2vOTPcwN4FBWx3CTqu/QIdyS7ij3JDwYBCD+R+ybp9AQkApv0/lqC VtQ+RqEduZr66clyuKIQxW+rP6NGsfCjzGoH2TYtsVoZxtv3ydIFWgzvI1AwP30wfe57 RgPEyhUFXOk7PhU5ftoyt3KVFY4H/GzuijSowFVKVjVCaLB1NWBotkf+lwlbuRzsR/6B Z6Uk2+HCp7NzM6oukAeTL5lLaQ/T2HAAiwP/bfTGaPwYiMjtopyjHXVErJ0Vg22bFb39 S30hdNwNAQEUrZGe7QlTUzr0LxHTFPPBRQZs4its/etb2uOBmvOaICey6kxhfUS0zpfh KZCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:mime-version:user-agent:date:message-id :subject:from:to:arc-authentication-results; bh=YVVtWXLP9Npy04t1D+sGbNIcAfdjSkYrI+UfmlG1cVU=; b=sErvz0PL1xnholycfmyrh0qaYNlZBqBtE6ESHTMvOC0QqnyXV69mc5eKCkUQq4HoAQ yUi6S+OhFUXCKZEyVSAk0xNxIREnIiB2gkvMDWAHlx5WQhLRgf4eVj3rcTZr5JUCHrIc GiBzBs9iWAwnycXZPAUvjHCEeqSE1WLbHkCTI1Tv3DhF2M7f6jusqYFK1c9Im2+vj4RH wqSHkN0Lt2i1a/3MqU4OA1obOEilSg4YOJulvTcyM0BQ1VVfxFd0S/gmEXwMJMcVV216 idpIStVHtOhEzV6x/q59keOpEHpqjXqXRHhpn4RuQN8d1NoJbIzAPLzvUMNqQxhrlH8W ul+w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l3si6458407pld.174.2017.11.09.06.04.09; Thu, 09 Nov 2017 06:04:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754825AbdKIOCF convert rfc822-to-8bit (ORCPT + 80 others); Thu, 9 Nov 2017 09:02:05 -0500 Received: from email.exegy.com ([199.191.53.230]:55347 "EHLO email.exegy.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751128AbdKIOCE (ORCPT ); Thu, 9 Nov 2017 09:02:04 -0500 X-Greylist: delayed 850 seconds by postgrey-1.27 at vger.kernel.org; Thu, 09 Nov 2017 09:02:03 EST Received: from mail.exegy.com ([10.19.1.37]) by email.exegy.com (8.14.3/8.14.3) with ESMTP id vA9Dll9g028321 for ; Thu, 9 Nov 2017 07:47:52 -0600 Received: from [10.19.4.86] (10.19.4.86) by mx2k10.eng.exegy.net (10.19.1.37) with Microsoft SMTP Server (TLS) id 14.3.301.0; Thu, 9 Nov 2017 07:47:46 -0600 To: linux-kernel From: "Mr. Berkley Shands" Subject: Intel Virtualization and clock_gettime reproducer Message-ID: <3a7989f1-6c72-781b-9352-a1b1c95384f9@exegy.com> Date: Thu, 9 Nov 2017 07:47:46 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8BIT Content-Language: en-US X-Scanned-By: Evios on 192.168.77.240 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This affects every kernel I tried, 4.9.[54|35|24], 3.18.27, RH 3.10.0-693*. The test machine is a Dell R740 with 2X8168 and 384GB. #include #include #include inline long GetPerf() { int _hi, _lo; __asm__ __volatile__ ("rdtsc":"=a" (_lo), "=d"(_hi)); return ((long) _hi << 32) | _lo; } int main() { struct timespec ts; int i, count; long start, end, delta, min, max, total, avg; count = 100; min = 0x7fffffff; max = 0; total = 0; for (i = 0; i < count; i++) { start = GetPerf(); clock_gettime(CLOCK_REALTIME, &ts); end = GetPerf(); delta = end - start; if (delta > max) max = delta; if (delta < min) min = delta; total += delta; } avg = total / count; printf("min: %ld\n", min); -- //E. F. Berkley Shands, MSc Senior Software Architect/Engineer Exegy Systems Engineering// **Exegy Inc.** 349 Marshall Road, Suite 100 St. Louis , MO 63119 Direct: (314) 218-3600 X450 Cell: (314) 303-2546 Office: (314) 218-3600 Fax: (314) 218-3601 The Usual Disclaimer follows... ________________________________ This e-mail and any documents accompanying it may contain legally privileged and/or confidential information belonging to Exegy, Inc. Such information may be protected from disclosure by law. The information is intended for use by only the addressee. If you are not the intended recipient, you are hereby notified that any disclosure or use of the information is strictly prohibited. If you have received this e-mail in error, please immediately contact the sender by e-mail or phone regarding instructions for return or destruction and do not use or disclose the content to others. From 1583467643593037687@xxx Wed Nov 08 03:40:22 +0000 2017 X-GM-THRID: 1582995129264619046 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread