WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: Very large value from get_nsec_offset() in timer_interru

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Re: Very large value from get_nsec_offset() in timer_interrupt
From: Ryan Harper <ryanh@xxxxxxxxxx>
Date: Fri, 21 Apr 2006 11:16:42 -0500
Delivery-date: Fri, 21 Apr 2006 12:03:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20060420224735.GY16776@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20060420224735.GY16776@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.6+20040907i
* Ryan Harper <ryanh@xxxxxxxxxx> [2006-04-20 17:47]:
> 
> ns_offset is calculated from get_nsec_offset().  I'm going to dig
> a little further, but I wanted to get what I'm seeing out there.

static u64 get_nsec_offset(struct shadow_time_info *shadow)
{
   u64 now, delta;
   rdtscll(now);
   delta = now - shadow->tsc_timestamp;
   return scale_delta(delta, shadow->tsc_to_nsec_mul, shadow->tsc_shift);
}

For some currently unknown reason, now is < shadow->tsc_timestamp;  This
results in a very large delta value, which is scaled up even larger.

The output from the multi-cpu clock info dump doesn't show anything
bogus:

(XEN) Min = 68672793737292 ; Max = 68672793747633 ; Diff = 10341 (10 
microseconds)
(XEN) Min = 68899728719792 ; Max = 68899728727283 ; Diff = 7491 (7 microseconds)

Any thoughts on why the shadow copy of the tsc_timestamp would be > than
the value returned from reading the tsc would be helpful.

Very likely this is related to the hardware, this is a 4-node x460
32-way.  I've not reproduced this on anything but multi-node setups.  

-- 
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
(512) 838-9253   T/L: 678-9253
ryanh@xxxxxxxxxx

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel