| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
 RE: [Xen-users] Setting CPU (core) frequency from dom0
 
 ETA can be in one or two weeks, and now coding is close to 
end (by Jinsong). This patch sets will cover many control bits besides 
allowing user to change freq as I said earlier.   For the code you 
mentioned, it's one bug since as you cited that return-0 means success. However 
it looks that this warning doesn't hurt the 
behavior: if 
(!cpufreq_register_notifier(&time_cpufreq_notifier_block,CPUFREQ_TRANSITION_NOTIFIER)) 
{
 printk(KERN_ERR "failed to set up cpufreq 
notifier\n");
 return -ENODEV;
 }
 return 
0;   Notifier is registered successfully and there's no code 
to reverse the effect even when -ENODEV is returned. :-) BTW in xen3.2, there's 
no PROCESSOR_EXTERNAL_CONTROL.    Thanks, Kevin 
 
  
  Hi Kevin,
 Thank you very much for the reply.
 
 PLease 
  see comments below.
 
 Alberto
 
 
 On Wed, Nov 19, 2008 at 7:05 PM, Tian, Kevin <kevin.tian@xxxxxxxxx>  
  wrote:
   
    
    Your 
    description is basically correct. Do you want to control cpu frequency from 
    dom0 user level, or just try cpufreq governor in dom0? 
     I would like to control frequency from dom0. I want to arbitrarily 
  set the  CPU frequency to a value and have it stay there (regardless 
  of  the load on that CPU) until I change it.
 
 
 
    
    For the 
    former, we're 
    currently adding more flexibility to xen cpufreq (such as user space 
    governor) and control options to xenpm (such as manually changing freq), 
    which is expected to reach xen upstream soon. 
   Yes, I thik this is what I need (ability to manually change 
  frequency). Do you have an ETA (estimated time of arrival) for that 
  functionality?
 
 
    
    For the 
    latter, it's suboptimal with limitations which is why xen cpufreq is 
    develeoped. You may manually disable PROCESSOR_EXTERNAL_CONTROL in 
    drivers/acpi/Kconfig to rebuild dom0 kernel for mode 
    A. OK.  I will do that.
 
 By the way, I have been running onto 
  an error  when booting (in mode A). The function  
  cpufreq_time_setup() in linux-2.6.18-xen.hg/arch/i386/kernel/time-xen.c is 
  printing the following message during boot (and returning -ENODEV to its 
  caller):
 
 failed to set up cpufreq notifier
 
 Further examination of the code shows 
  that this happens when  notifier_chain_register() in 
  linux-2.6.18-xen.hg/kernel/sys.c returns 0. The problem is that in the code I 
  have, that function ALWAYS returns 0. The code for that function is as 
  follows:
 
 static int notifier_chain_register(struct notifier_block 
  **nl,
 struct notifier_block 
  *n)
 {
 while ((*nl) != NULL) {
 if (n->priority > 
  (*nl)->priority)
 break;
 nl = 
  &((*nl)->next);
 }
 n->next = *nl;
 rcu_assign_pointer(*nl, 
  n);
 return 0;
 }
 
 think (but are not 100% sure 
  yet) that as a result of this error, dom0 is not creating a cpufreq /sys 
  interface (i.e
 
 Do you happen to 
  know what may be going on? perhaps I am just misreading the code? or perhaps 
  not disabling PROCESSOR_EXTERNAL_CONTROL is what is causing this behavior? I will run 
  some experiments on this last thing today.
 
 Thanks 
  again,
 
 Alberto
 
 
 
    
    
   Thanks, Kevin 
      
      
      
      
      Hello everyone, I am running some experiments that 
      require changing the frequency of a CPU in a SunFire machine (32-core quad 
      socket AMD Barcelona). For what I have found (bits and pieces but 
      not a comprehensive description), there are two meachisms for controlling 
      core (most probably socket) frequency in Xen: A- The older 
      (xen-3.2.1) mechnism through dom0 (option cpufreq=dom0-kernel), which for 
      what I gather uses a module in dom0 (cpufreqd?) that allows one to set cpu 
      frequency. B- The newer (xen-3.3), which has moved the governor to 
      the hypervisor (option cpufreq=xen), which other than a utility to read 
      processor P and C states (xenpm) does not (yet) allow user (dom0) control 
      of CPU frequency. My first question is whetherot what I have 
      written above is accurate. My second question is where can I find detailed 
      information on how to set up my system to make use of A above and be able 
      to set cpu frequency "manually" from Dom0 (assuming that is still possible 
      in Xen 3.3). I am running the latest testing version of Xen 3.3 
      (about a week old). Any information would be greatly 
      appreciated. Thank 
    you, Alberto _______________________________________________
 Xen-users 
    mailing list
 Xen-users@xxxxxxxxxxxxxxxxxxx
 http://lists.xensource.com/xen-users
 
 _______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users 
 |