lkml.org 
[lkml]   [2013]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 10/13] perf kvm: add live mode
On 5/9/13 2:45 AM, Namhyung Kim wrote:
> On Wed, 8 May 2013 22:31:46 -0600, David Ahern wrote:
> [SNIP]
>> +static int perf_kvm__timerfd_create(struct perf_kvm_stat *kvm)
>> +{
>> + struct itimerspec new_value;
>> + struct timespec now;
>> + int rc = -1;
>> +
>> + kvm->timerfd = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK);
>> + if (kvm->timerfd < 0) {
>> + pr_err("timerfd_create failed\n");
>> + goto out;
>> + }
>> +
>> + if (clock_gettime(CLOCK_MONOTONIC, &now) != 0) {
>> + pr_err("clock_gettime failed: %d\n", errno);
>> + close(kvm->timerfd);
>> + goto out;
>> + }
>> +
>> + new_value.it_value.tv_sec = now.tv_sec + kvm->display_time;
>> + new_value.it_value.tv_nsec = now.tv_nsec;
>> + new_value.it_interval.tv_sec = kvm->display_time;
>> + new_value.it_interval.tv_nsec = 0;
>> +
>> + if (timerfd_settime(kvm->timerfd, TFD_TIMER_ABSTIME,
>> + &new_value, NULL) != 0) {
>
> Looks like no need to use ABSTIME.

hmmm.... I did that for a reason. I forget why now. Let me poke around
with it and see if I can remember.

David



\
 
 \ /
  Last update: 2013-05-09 16:41    [W:0.184 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site