Re: [libvirt] [PATCHv3] util: make it more robust to calculate timeout value

2015-05-27 Thread Martin Kletzander
On Mon, May 25, 2015 at 02:22:42PM +0800, Wang Yufei wrote: From: Zhang Bo oscar.zhan...@huawei.com When we change system clock to years ago, a certain CPU may use up 100% cputime. The reason is that in function virEventPollCalculateTimeout(), we assign the unsigned long long result to an INT

Re: [libvirt] [PATCHv3] util: make it more robust to calculate timeout value

2015-05-27 Thread Martin Kletzander
On Wed, May 27, 2015 at 04:58:22PM +0200, Martin Kletzander wrote: On Mon, May 25, 2015 at 02:22:42PM +0800, Wang Yufei wrote: From: Zhang Bo oscar.zhan...@huawei.com When we change system clock to years ago, a certain CPU may use up 100% cputime. The reason is that in function

[libvirt] [PATCHv3] util: make it more robust to calculate timeout value

2015-05-25 Thread Wang Yufei
From: Zhang Bo oscar.zhan...@huawei.com When we change system clock to years ago, a certain CPU may use up 100% cputime. The reason is that in function virEventPollCalculateTimeout(), we assign the unsigned long long result to an INT variable, *timeout = then - now; // timeout is INT, and