All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Revert Jan's patch (c/s 18879) since now it can be achieved by xenpm tool now
@ 2008-12-20 13:37 Liu, Jinsong
  2008-12-22  8:55 ` [PATCH] Revert Jan's patch (c/s 18879) since now it canbe " Jan Beulich
  0 siblings, 1 reply; 9+ messages in thread
From: Liu, Jinsong @ 2008-12-20 13:37 UTC (permalink / raw)
  To: xen-devel@lists.xensource.com; +Cc: Keir Fraser

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

Revert Jan's patch (c/s 18879) since now it can be achieved by 
xenpm tool now.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>

[-- Attachment #2: px-xen-1-revert-jan.patch --]
[-- Type: application/octet-stream, Size: 5154 bytes --]

Revert Jan's patch (c/s 18879) since now it can be achieved by 
xenpm tool now.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>

diff -r 9e3d81ea61fb xen/common/domain.c
--- a/xen/common/domain.c	Thu Dec 18 14:14:30 2008 +0800
+++ b/xen/common/domain.c	Fri Dec 19 15:09:32 2008 +0800
@@ -25,7 +25,6 @@
 #include <xen/percpu.h>
 #include <xen/multicall.h>
 #include <xen/rcupdate.h>
-#include <acpi/cpufreq/cpufreq.h>
 #include <asm/debugger.h>
 #include <public/sched.h>
 #include <public/vcpu.h>
@@ -42,25 +41,16 @@ enum cpufreq_controller cpufreq_controll
 enum cpufreq_controller cpufreq_controller;
 static void __init setup_cpufreq_option(char *str)
 {
-    char *arg;
-
     if ( !strcmp(str, "dom0-kernel") )
     {
         xen_processor_pmbits &= ~XEN_PROCESSOR_PM_PX;
         cpufreq_controller = FREQCTL_dom0_kernel;
         opt_dom0_vcpus_pin = 1;
-        return;
     }
-
-    if ( (arg = strpbrk(str, ",:")) != NULL )
-        *arg++ = '\0';
-
-    if ( !strcmp(str, "xen") )
+    else if ( !strcmp(str, "xen") )
     {
         xen_processor_pmbits |= XEN_PROCESSOR_PM_PX;
         cpufreq_controller = FREQCTL_xen;
-        if ( arg && *arg )
-            cpufreq_cmdline_parse(arg);
     }
 }
 custom_param("cpufreq", setup_cpufreq_option);
diff -r 9e3d81ea61fb xen/drivers/cpufreq/cpufreq_ondemand.c
--- a/xen/drivers/cpufreq/cpufreq_ondemand.c	Thu Dec 18 14:14:30 2008 +0800
+++ b/xen/drivers/cpufreq/cpufreq_ondemand.c	Fri Dec 19 15:09:32 2008 +0800
@@ -37,7 +37,6 @@
 #define TRANSITION_LATENCY_LIMIT                (10 * 1000 )
 
 static uint64_t def_sampling_rate;
-static uint64_t usr_sampling_rate;
 
 /* Sampling types */
 enum {DBS_NORMAL_SAMPLE, DBS_SUB_SAMPLE};
@@ -244,20 +243,7 @@ int cpufreq_governor_dbs(struct cpufreq_
             if (def_sampling_rate < MIN_STAT_SAMPLING_RATE)
                 def_sampling_rate = MIN_STAT_SAMPLING_RATE;
 
-            if (!usr_sampling_rate)
-                dbs_tuners_ins.sampling_rate = def_sampling_rate;
-            else if (usr_sampling_rate < MIN_SAMPLING_RATE) {
-                printk(KERN_WARNING "cpufreq/ondemand: "
-                       "specified sampling rate too low, using %"PRIu64"\n",
-                       MIN_SAMPLING_RATE);
-                dbs_tuners_ins.sampling_rate = MIN_SAMPLING_RATE;
-            } else if (usr_sampling_rate > MAX_SAMPLING_RATE) {
-                printk(KERN_WARNING "cpufreq/ondemand: "
-                       "specified sampling rate too high, using %"PRIu64"\n",
-                       MAX_SAMPLING_RATE);
-                dbs_tuners_ins.sampling_rate = MAX_SAMPLING_RATE;
-            } else
-                dbs_tuners_ins.sampling_rate = usr_sampling_rate;
+            dbs_tuners_ins.sampling_rate = def_sampling_rate;
         }
         dbs_timer_init(this_dbs_info);
 
@@ -297,55 +283,3 @@ static void cpufreq_gov_dbs_exit(void)
     cpufreq_unregister_governor(&cpufreq_gov_dbs);
 }
 __exitcall(cpufreq_gov_dbs_exit);
-
-void __init cpufreq_cmdline_parse(char *str)
-{
-    do {
-        char *val, *end = strchr(str, ',');
-
-        if ( end )
-            *end++ = '\0';
-        val = strchr(str, '=');
-        if ( val )
-            *val = '\0';
-
-        if ( !strcmp(str, "rate") && val )
-        {
-            usr_sampling_rate = simple_strtoull(val, NULL, 0);
-        }
-        else if ( !strcmp(str, "threshold") && val )
-        {
-            unsigned long tmp = simple_strtoul(val, NULL, 0);
-
-            if ( tmp < MIN_FREQUENCY_UP_THRESHOLD )
-            {
-                printk(XENLOG_WARNING "cpufreq/ondemand: "
-                       "specified threshold too low, using %d\n",
-                       MIN_FREQUENCY_UP_THRESHOLD);
-                tmp = MIN_FREQUENCY_UP_THRESHOLD;
-            }
-            else if ( tmp > MAX_FREQUENCY_UP_THRESHOLD )
-            {
-                printk(XENLOG_WARNING "cpufreq/ondemand: "
-                       "specified threshold too high, using %d\n",
-                       MAX_FREQUENCY_UP_THRESHOLD);
-                tmp = MAX_FREQUENCY_UP_THRESHOLD;
-            }
-            dbs_tuners_ins.up_threshold = tmp;
-        }
-        else if ( !strcmp(str, "bias") && val )
-        {
-            unsigned long tmp = simple_strtoul(val, NULL, 0);
-
-            if ( tmp > 1000 )
-            {
-                printk(XENLOG_WARNING "cpufreq/ondemand: "
-                       "specified bias too high, using 1000\n");
-                tmp = 1000;
-            }
-            dbs_tuners_ins.powersave_bias = tmp;
-        }
-
-        str = end;
-    } while ( str );
-}
diff -r 9e3d81ea61fb xen/include/acpi/cpufreq/cpufreq.h
--- a/xen/include/acpi/cpufreq/cpufreq.h	Thu Dec 18 14:14:30 2008 +0800
+++ b/xen/include/acpi/cpufreq/cpufreq.h	Fri Dec 19 15:09:32 2008 +0800
@@ -52,8 +52,6 @@ extern struct cpufreq_policy *cpufreq_cp
 
 extern int __cpufreq_set_policy(struct cpufreq_policy *data,
                                 struct cpufreq_policy *policy);
-
-void cpufreq_cmdline_parse(char *);
 
 #define CPUFREQ_SHARED_TYPE_NONE (0) /* None */
 #define CPUFREQ_SHARED_TYPE_HW   (1) /* HW does needed coordination */

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

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-12-23  9:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-20 13:37 [PATCH] Revert Jan's patch (c/s 18879) since now it can be achieved by xenpm tool now Liu, Jinsong
2008-12-22  8:55 ` [PATCH] Revert Jan's patch (c/s 18879) since now it canbe " Jan Beulich
2008-12-22  9:40   ` Liu, Jinsong
2008-12-22 10:12     ` [PATCH] Revert Jan's patch (c/s 18879) since now itcanbe " Jan Beulich
2008-12-23  2:29       ` Liu, Jinsong
2008-12-23  8:38         ` Keir Fraser
2008-12-23  9:02           ` Liu, Jinsong
2008-12-23  9:06             ` Keir Fraser
2008-12-23  9:34               ` [PATCH] Revert Jan's patch (c/s 18879) since nowitcanbe " Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.