qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Richard W.M. Jones" <rjones@redhat.com>
To: Laurent Vivier <lvivier@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	qemu-devel@nongnu.org, David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [PATCH] i6300esb: correctly convert watchdog clock ticks into nanoseconds
Date: Tue, 4 Aug 2015 11:13:26 +0100	[thread overview]
Message-ID: <20150804101326.GS29283@redhat.com> (raw)
In-Reply-To: <1438609948-3744-1-git-send-email-lvivier@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1686 bytes --]

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

[-- Attachment #2: i6300esb-test.sh --]
[-- Type: application/x-sh, Size: 1085 bytes --]

  parent reply	other threads:[~2015-08-04 10:13 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-03 13:52 [Qemu-devel] [PATCH] i6300esb: correctly convert watchdog clock ticks into nanoseconds Laurent Vivier
2015-08-03 14:28 ` Laurent Vivier
2015-08-03 14:46   ` Richard W.M. Jones
2015-08-03 15:02     ` Paolo Bonzini
2015-08-03 15:13       ` Laurent Vivier
2015-08-03 15:18         ` Paolo Bonzini
2015-08-03 15:35           ` Laurent Vivier
2015-08-03 16:06             ` Paolo Bonzini
2015-08-03 15:06     ` Laurent Vivier
2015-08-04  8:27 ` [Qemu-devel] [PATCH][TRIVIAL] i6300esb: fix timer overflow Laurent Vivier
2015-08-04 13:47   ` Richard W.M. Jones
2015-08-05  0:01   ` David Gibson
2015-09-06 10:29   ` Michael Tokarev
2015-09-06 14:35     ` Paolo Bonzini
2015-09-06 14:41       ` Laurent Vivier
2015-08-04 10:13 ` Richard W.M. Jones [this message]
2015-08-04 10:25   ` [Qemu-devel] [PATCH] i6300esb: correctly convert watchdog clock ticks into nanoseconds Laurent Vivier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150804101326.GS29283@redhat.com \
    --to=rjones@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).