Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp278549imm; Tue, 17 Jul 2018 19:00:56 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcFuPJw1mS1aUL8TspVVeKgX5lz6iNoTdNpm6Yp/MqhMH9TOhsC93Eg4nUn+JVqjmfUrD9Q X-Received: by 2002:a63:ac57:: with SMTP id z23-v6mr3729892pgn.74.1531879256271; Tue, 17 Jul 2018 19:00:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531879256; cv=none; d=google.com; s=arc-20160816; b=VTmkNrlhnv5mXNy3Nf63ahZlt6RpGT+fs5CXjg36FuLlZLctgKogOX9eDIYp/9lrvt BjEomTdM5n9gjz1dAXUKxrZewdcHSWvE2uo31VjeVMq0F/6PCswCT5TfxK8g0ifhkfJ7 t9bQGnUEvd8sWqCaR1ENsK934iiXn30wZLgUSp8EYzQJe89qG1ynDZotBcpVxqxfqxwR xs4J5usPG8ydT5XCrzDhPaOLeq91+6FARNUPOj2fHXZ5gx5+ORFEwgWaPAlG2sNa3dhw qWfNKko8tgxaqqZ6aGDDblgUCrzqty21OosTcxt2E2oot9ofnB/Llx1+V7orVpjkZ3UC Z6DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=3K7dODvDLZCT6t5t0vDDX/QTnGD7urDieh1YXC0n6UY=; b=sdveYFYbuYD+ePv1G70Aa1F1HEG8W4ccmiMlESZ+eBa0xwqSn65BjC2r2MPURp8nwt VVGYMvLkJCV2JNmLRPFR9naFKMSmDFoFAi66zAGFiyLL8VWXaKtoj/oy16UP6EMXklv0 UlRVxAttSucGEr1ZUzex4pMMQi2Kp85P1mgzJfLMoPtbLH1SM4hZzqoH7Wh+pM97LjWP PfYIe2tZOBhUzzyvycSjh7hgrJeH6tiTken2BeZ61+cGQi42IlVs2nMOeFcR941rNazC 0rhShipx9EPZxSNh0U2DRdPc56dazHBbAvqEW6FV9wpO3di/wWqUwxmf3wF1KR4xN2C7 0lFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=azdtECHC; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g80-v6si2355195pfk.53.2018.07.17.19.00.40; Tue, 17 Jul 2018 19:00:56 -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=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=azdtECHC; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731429AbeGRCfV (ORCPT + 99 others); Tue, 17 Jul 2018 22:35:21 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:35552 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730873AbeGRCfV (ORCPT ); Tue, 17 Jul 2018 22:35:21 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w6I1xtuq156686; Wed, 18 Jul 2018 01:59:55 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : references : in-reply-to : from : date : message-id : subject : to : cc : content-type; s=corp-2018-07-02; bh=3K7dODvDLZCT6t5t0vDDX/QTnGD7urDieh1YXC0n6UY=; b=azdtECHCGwQP6pxt4Q3FS3T4CS3+0DqQT+h2cJ0Qq0UPfeQp2bM8E75PH2ohcrg4o4ve 3G5mGRht7uC7sqC0IiIYqsbZEe93OpKyTThlRMhkDzCxUbZwSgmhJOmA8KnsylUuZ0Qb 7FKPYM0Gdjc0qBS9JogwSrvIUBK8EoaLgwadYJa/nSA+HNE+gy2dU4h9iZ/SR+ukeWsC nS1EutFyKPe+8nI7I9wEWrFadRh9+8uR09FPsKdGY/9dC0HysfttfaHW9R0uhyrqoPLh MHNNGCiVCVVfKho/1js3I20ow4m3hQyP3e+lGkG5hl/bDUOJm6E5GsRxk5hmevlLkBjz yw== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2k7a3tb2xv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 18 Jul 2018 01:59:55 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w6I1xq5r009133 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 18 Jul 2018 01:59:52 GMT Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w6I1xqRj004580; Wed, 18 Jul 2018 01:59:52 GMT Received: from mail-oi0-f48.google.com (/209.85.218.48) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 17 Jul 2018 18:59:52 -0700 Received: by mail-oi0-f48.google.com with SMTP id s198-v6so5775591oih.11; Tue, 17 Jul 2018 18:59:51 -0700 (PDT) X-Gm-Message-State: AOUpUlHdQcA1wPMyH08RzVs+2939MPSP4zS9Ij1483P1YfdhPKNUfiMM x9skTEJazb4uUaaDAJ3EOkDbsaPyCxkds3VUcA4= X-Received: by 2002:aca:4784:: with SMTP id u126-v6mr4591566oia.229.1531879191321; Tue, 17 Jul 2018 18:59:51 -0700 (PDT) MIME-Version: 1.0 References: <20180712000419.5165-1-pasha.tatashin@oracle.com> <20180712000419.5165-8-pasha.tatashin@oracle.com> <93178b98-8464-ae36-3536-0baa639b3467@oracle.com> In-Reply-To: <93178b98-8464-ae36-3536-0baa639b3467@oracle.com> From: Pavel Tatashin Date: Tue, 17 Jul 2018 21:59:15 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v13 07/18] x86/xen/time: output xen sched_clock time from 0 To: boris.ostrovsky@oracle.com Cc: Steven Sistare , Daniel Jordan , linux@armlinux.org.uk, schwidefsky@de.ibm.com, Heiko Carstens , John Stultz , sboyd@codeaurora.org, x86@kernel.org, LKML , mingo@redhat.com, tglx@linutronix.de, hpa@zytor.com, douly.fnst@cn.fujitsu.com, peterz@infradead.org, prarit@redhat.com, feng.tang@intel.com, Petr Mladek , gnomes@lxorguk.ukuu.org.uk, linux-s390@vger.kernel.org, jgross@suse.com Content-Type: text/plain; charset="UTF-8" X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8957 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=3 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=670 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807180021 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > +static u64 xen_sched_clock(void) > > +{ > > + return xen_clocksource_read() - xen_sched_clock_offset; > > +} > > > Should other invocations of xen_clocksource_read() also be offset? > I do not believe so. Look in arch/x86/kernel/kvmclock.c kvm_clock_get_cycles() is not normalized for instance. We need to normalize kvm_sched_clock_read() and xen_sched_clock(), because it is used by printk() as a sched_clock() prefix. So not to be confusing we print time starting from 0, but the other instances where xen_clocksource_read() is used do not need that. Thank you, Pavel