[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 1/5] cpu: Provide vcpu throttling interface
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v6 1/5] cpu: Provide vcpu throttling interface |
Date: |
Mon, 7 Sep 2015 14:53:07 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 |
On 04/09/2015 18:26, Jason J. Herne wrote:
> + pct = (double)cpu_throttle_get_percentage()/100;
> + throttle_ratio = pct / (1 - pct);
> + sleeptime_ms = (long)(throttle_ratio * CPU_THROTTLE_TIMESLICE);
This is going to be pretty imprecise, since there are only 11 possible
values of sleeptime_ms. Can you switch the timer and
CPU_THROTTLE_TIMESLICE to nanosecond precision instead?
It's okay to provide this as a patch 6/5, and the maintainer will squash
it into this patch. Alternatively this can be sent as v7, as you prefer.
Paolo
> +
> + qemu_mutex_unlock_iothread();
> + atomic_set(&cpu->throttle_thread_scheduled, 0);
> + g_usleep(sleeptime_ms * 1000); /* Convert ms to us for usleep call */
- [Qemu-devel] [PATCH v6 0/5] migration: Dynamic cpu throttling for auto-converge, Jason J. Herne, 2015/09/04
- [Qemu-devel] [PATCH v6 2/5] migration: Parameters for auto-converge cpu throttling, Jason J. Herne, 2015/09/04
- [Qemu-devel] [PATCH v6 4/5] qmp/hmp: Add throttle ratio to query-migrate and info migrate, Jason J. Herne, 2015/09/04
- [Qemu-devel] [PATCH v6 5/5] migration: Disambiguate MAX_THROTTLE, Jason J. Herne, 2015/09/04
- [Qemu-devel] [PATCH v6 1/5] cpu: Provide vcpu throttling interface, Jason J. Herne, 2015/09/04
- Re: [Qemu-devel] [PATCH v6 1/5] cpu: Provide vcpu throttling interface,
Paolo Bonzini <=
- [Qemu-devel] [PATCH v6 3/5] migration: Dynamic cpu throttling for auto-converge, Jason J. Herne, 2015/09/04