From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [RFC PATCH v2 10/12] cpufreq: add dom0-cpufreq driver Date: Wed, 22 Oct 2014 12:00:31 +0100 Message-ID: <1413975631.18118.11.camel@citrix.com> References: <1413458826-7248-1-git-send-email-oleksandr.dmytryshyn@globallogic.com> <1413458826-7248-11-git-send-email-oleksandr.dmytryshyn@globallogic.com> <54412FC1020000780003F997@mail.emea.novell.com> <5447956E0200007800040EB3@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5447956E0200007800040EB3@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Tim Deegan , Oleksandr Dmytryshyn , Stefano Stabellini , xen-devel List-Id: xen-devel@lists.xenproject.org On Wed, 2014-10-22 at 10:30 +0100, Jan Beulich wrote: > >>> On 22.10.14 at 10:43, wrote: > > On Fri, Oct 17, 2014 at 4:03 PM, Jan Beulich wrote: > >>>>> On 16.10.14 at 13:27, wrote: > >>> +static void notify_cpufreq_domains(void) > >> Why "domains", not "hwdom"? You don't really want to send this > >> to other than the hardware domain I hope. > > All domains (not only hwdomain) should receive this interrupt. > > In case is hwdomain is Linux kernel it can automaticaly recalculate > > jiffies. But other domains should recalculate jiffies too. I'll > > implement this mechanism a bit later. > > This needs more explanation then: If all domains need to do > adjustments when the frequency changes, there's something > wrong here imo. Such changes are supposed to be visible to > the hypervisor only (with, in the case here, assistance - but > nothing else - by the hardware domain). Guests should be using the arch/generic timers as their time source. This is required by the hardware to increment at a fixed frequency, so guests shouldn't need to be aware of the change to the underlying processor clock, at least not for timekeeping/jiffies purposes. The timers are allowed to increment by larger amounts less frequency in lower power modes, i.e. +=4 every 4 ticks. Guests shouldn't need to adjust anything for this though IMHO. Ian.