public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: Anthony Liguori <anthony-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
Cc: kvm-devel <kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: Re: [PATCH] Lazy FPU save/restore
Date: Sun, 18 Feb 2007 20:21:11 +0200	[thread overview]
Message-ID: <45D89917.9090003@qumranet.com> (raw)
In-Reply-To: <45D87C2E.2090806-atKUWr5tajBWk0Htik3J/w@public.gmane.org>

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

Avi Kivity wrote:
>>
>> I'll have to try and setup a 64 bit system.  I cannot reproduce on my 
>> 32bit system with your test program.
>
> It may be related to 64-bit (as that uses sse for floating point), or 
> to the fact that I use ssh on a remote host, which causes more context 
> switches.  I'll try to reproduce on 32 bits with my setup.
>

It doesn't reproduce on a 32-bit host.  However, it does reproduce on a 
32-bit guest on a 64-bit host, and on a 32-bit user load running in a 
64-bit guest on a 64-bit host.

I'm attaching an updated test program which makes it easier to spot the 
failures.  You only need to run it on the guest, although running it on 
the host as well increases the failure rate significantly.

-- 
error compiling committee.c: too many arguments to function


[-- Attachment #2: fpu.c --]
[-- Type: text/x-csrc, Size: 506 bytes --]


#include <stdio.h>
#include <math.h>

double test_fpu_once()
{
    int i;
    double f = 0;

    for (i = 0; i < 10000000; ++i)
	f += 1 / (1.0 + i);
    return f;
}

void test_fpu()
{
    double a, b;
    int runs;

    runs = 0;
    a = test_fpu_once();
    while (1) {
	b = test_fpu_once();
	if (fabs(a - b) > 1e-9)
	    printf("error: %20.16f -> %20.16f\n", a, b);
	a = b;
	if (++runs % 100 == 0)
	    printf("runs: %8d\n", runs);
    }
}

int main(int ac, char **av)
{
    test_fpu();
    return 0;
}

[-- Attachment #3: Type: text/plain, Size: 345 bytes --]

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

[-- Attachment #4: Type: text/plain, Size: 186 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel

  parent reply	other threads:[~2007-02-18 18:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-16  1:02 [PATCH] Lazy FPU save/restore Anthony Liguori
     [not found] ` <45D502A1.5000303-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2007-02-16  3:23   ` Rusty Russell
2007-02-18  9:39   ` Avi Kivity
     [not found]     ` <45D81EB6.9010407-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-02-18 14:25       ` Avi Kivity
     [not found]         ` <45D861CD.4020207-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-02-18 16:13           ` Anthony Liguori
     [not found]             ` <45D87B22.6070403-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2007-02-18 16:17               ` Avi Kivity
     [not found]                 ` <45D87C2E.2090806-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-02-18 18:21                   ` Avi Kivity [this message]
     [not found]                     ` <45D89917.9090003-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-02-18 22:55                       ` Anthony Liguori
     [not found]                         ` <45D8D96B.50104-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2007-02-19  8:13                           ` Avi Kivity

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=45D89917.9090003@qumranet.com \
    --to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
    --cc=anthony-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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