Received: by 10.213.65.68 with SMTP id h4csp990976imn; Wed, 14 Mar 2018 06:30:42 -0700 (PDT) X-Google-Smtp-Source: AG47ELu92YwhoE8Pvu2d0pq0J2n5s+VG57ZfIwVsLNdVD+LdyTM0C8bSq1E6G8HTSDCwPM/HQIGe X-Received: by 10.98.7.129 with SMTP id 1mr4317946pfh.133.1521034241962; Wed, 14 Mar 2018 06:30:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521034241; cv=none; d=google.com; s=arc-20160816; b=m4LMbV9YmqiNNdJ9VfBVl1YdsUftKbLsR8WrrMXvsmh72SnfRsErS59lOvptG7wFep htP4swvNF6oQ7MQg272Ly7Gb6pOnbH22w9aub2dbgZj5etsekcTclflfXcy1IwFgl/4K Doze5bYwsjJF5kU2N5JPvDG0DjmDUVL90ANqN8dnYrHnKCqUE5T5c1Sowd1LZZ6qeHSW EZstT5+HqXUtHqFETtWaHdhXe9QCD28cwYsuxzN6ISPZ5NlkfN/M5Q07NC48LQ6ayXdQ /p/7+D6lsn2qNtqPWCFKB0ejJrJMt/pPENt/e37lgMyxAQQv6KJuf9Zuj+x1K6kFr9hl xkYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=121erKyrutHCjI0Q54v8ScKjYgOQmVuoaITMia8+B/k=; b=qe11AWCO7ErUiEsnKMH6FopAl2F5m01qP40GNle8OHo9y5sUCwVYRDuCyVs5KgSyTY dSISm1xP8VKFAbAsCEIDm3kP5v/lRpmTi826pV3aJwUwl0Uz5zb4b81yqiK3XoJvoAoB lhFEnHqbnomcJ6Maj1ZUa6YCz8a5nvcr7qrhRXjPQVQQ1lqRjlVamzFETp35XQIL52GY pP+KXPu7XioSCaB/G9JdRc99q2t9MctSyEaUtM6QDE6OHquessr+Z03l2X+G0CO8UuDQ m//sJLtTkTKFVI3TNeRyOmBYmWS3Pjg5mD20ANRb/HK8+zvWDqQNasV+AEODoU7Mz1U+ AA0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=V7CXVXnL; 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 x3-v6si1914236plb.738.2018.03.14.06.30.26; Wed, 14 Mar 2018 06:30:41 -0700 (PDT) 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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=V7CXVXnL; 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 S1751727AbeCNN3H (ORCPT + 99 others); Wed, 14 Mar 2018 09:29:07 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:55496 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751348AbeCNN3F (ORCPT ); Wed, 14 Mar 2018 09:29:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=121erKyrutHCjI0Q54v8ScKjYgOQmVuoaITMia8+B/k=; b=V7CXVXnLqGNzR1sHVHm+uxjV9 9Ptyoeg8nM7AYtFmm6kieIRy2pmF4KEwYUNny6lBINcIDUlpObPlBjdHK464/lxBXkeWTxAAEpmgG URa0Ml0cC/kcfaW1Oo7AcYlnzWEwg27xoo7vD7qMDlnAZdPqGQi6dHM7nOEpt6J/x1QO0PGar3sTg ETN9fbWBKt/CevQGGml0t95TU9KVtZCIibC3ZutE/j7fDPy2d1fZ8IVkjzsahahpcEnoegsq6FtyZ OikYf6wVbms197inAkhluyMB4A+jAki5C7tr3mMyI4H6+0+sVSUfZ7BjnNblcJ5gfbB/IPfXNCNZw 3CR1yjBYg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1ew6Sk-0002JK-D3; Wed, 14 Mar 2018 13:29:02 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id E140D2029F86E; Wed, 14 Mar 2018 14:29:00 +0100 (CET) Date: Wed, 14 Mar 2018 14:29:00 +0100 From: Peter Zijlstra To: Jason Vas Dias Cc: x86@kernel.org, LKML , Thomas Gleixner , andi Subject: Re: [PATCH v4.16-rc4 2/2] x86/vdso: on Intel, VDSO should handle CLOCK_MONOTONIC_RAW Message-ID: <20180314132900.GN4064@hirez.programming.kicks-ass.net> References: <20180312082741.GD4064@hirez.programming.kicks-ass.net> <20180314094519.GD4082@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 14, 2018 at 12:55:20PM +0000, Jason Vas Dias wrote: > > You could read the time using the group_fd's mmap() page. That actually > > includes the TSC mult,shift,offset as used by perf clocks. > > > > Yes, but as mentioned earlier, that presupposes I want to use the mmap() > sample method - I don't - I want to use the Group FD method, so > that I can be sure the measurements are for the same code sequence > over the same period of time. You can use both, you can use the data from the mmap page to convert the times obtained from the read() syscall back to raw TSC ticks for all I care (in fact, that's what some people do). Then your userspace can use saw RDTSC instructions and not worry about scaling anything.