[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] i6300esb: correctly convert watchdog clock tick
From: |
Richard W.M. Jones |
Subject: |
Re: [Qemu-devel] [PATCH] i6300esb: correctly convert watchdog clock ticks into nanoseconds |
Date: |
Tue, 4 Aug 2015 11:13:26 +0100 |
User-agent: |
Mutt/1.5.20 (2009-12-10) |
On Mon, Aug 03, 2015 at 03:52:28PM +0200, Laurent Vivier wrote:
> + /* A 33 Mhz clock gives a 30 ns tick,
> + * convert timeout from ticks to ns
> */
> - timeout = muldiv64(get_ticks_per_sec(), timeout, 33000000);
> + timeout *= 30;
I see that you've just posted a v2 of this patch. However here are
the results of testing the above version. I used the attached test
script which automates things, mostly.
All times are in seconds.
Requested timeout Observed timeout
60 58
120 120
250 249
270 271
500 501 [note 1]
520 522
1010 1016
1030 1035
2046 2058
2500 ioctl: WDIOC_SETTIMEOUT: error setting timeout: Invalid argument
[note 2]
[note 1] I'm not worried about the timeout being off by a few seconds,
as that could easily be caused by inaccuracies in the test framework.
[note 2] Maximum setting for i6300esb Linux driver is 2046, see
linux.git/drivers/watchdog/i6300esb.c but note that the printed
messages in the driver relating to the range of the timeout are not
accurate.
This patch looks good to me. I will test the v2 patch shortly.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v
i6300esb-test.sh
Description: Bourne shell script
- Re: [Qemu-devel] [PATCH] i6300esb: correctly convert watchdog clock ticks into nanoseconds, (continued)
- Re: [Qemu-devel] [PATCH] i6300esb: correctly convert watchdog clock ticks into nanoseconds, Richard W.M. Jones, 2015/08/03
- Re: [Qemu-devel] [PATCH] i6300esb: correctly convert watchdog clock ticks into nanoseconds, Paolo Bonzini, 2015/08/03
- Re: [Qemu-devel] [PATCH] i6300esb: correctly convert watchdog clock ticks into nanoseconds, Laurent Vivier, 2015/08/03
- Re: [Qemu-devel] [PATCH] i6300esb: correctly convert watchdog clock ticks into nanoseconds, Paolo Bonzini, 2015/08/03
- Re: [Qemu-devel] [PATCH] i6300esb: correctly convert watchdog clock ticks into nanoseconds, Laurent Vivier, 2015/08/03
- Re: [Qemu-devel] [PATCH] i6300esb: correctly convert watchdog clock ticks into nanoseconds, Paolo Bonzini, 2015/08/03
- Re: [Qemu-devel] [PATCH] i6300esb: correctly convert watchdog clock ticks into nanoseconds, Laurent Vivier, 2015/08/03
- [Qemu-devel] [PATCH][TRIVIAL] i6300esb: fix timer overflow, Laurent Vivier, 2015/08/04
- Re: [Qemu-devel] [PATCH] i6300esb: correctly convert watchdog clock ticks into nanoseconds,
Richard W.M. Jones <=