mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "art" <art@usfltd.com>
To: linux-kernel@vger.kernel.org
Cc: venkatesh.pallipadi@intel.com, alexey.y.starikovskiy@intel.com,
	torvalds@osdl.org, akpm@osdl.org, mingo@elte.hu
Subject: cpufreq_ondemand governor - problem
Date: Fri, 14 Jul 2006 17:42:04 -0500	[thread overview]
Message-ID: <20060714224204.31311.qmail@mail.webhostingstar.com> (raw)

problem:
on dualcore AMD - if you use cpufreq_ondemand governor and your program is 
one_process/one_thread intensive one core is busy and second is doing 
nothing - governor is droping speed on both cores to lowest speed - slowing 
down busy core process - my dualcore-AMD do this i'm not shure if it is only 
AMD or INTEL problem too 

to test this set ondemand governor 

# echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor 

now
start in terminal-1 

#awk 'BEGIN {for(i=0;i<100000;i++)for(j=0;j<100000;j++);}' 

observe cpu speed and utilization
core1 - utilization 100% speed lowest possible
core2 - utilization 0% speed lowest possible 

now
start in terminal-2 

#awk 'BEGIN {for(i=0;i<100000;i++)for(j=0;j<100000;j++);}' 

observe cpu speed and utilization
core1 - utilization 100% speed max possible
core2 - utilization 100% speed max possible 

now kill one awk 

observe cpu speed and utilization
core1 - utilization 100% speed lowest possible
core2 - utilization 0% speed lowest possible 

looks like cpufreq ondemand governor sets two frequency dependent cores to 
speed level ok for that one with lowest utilization slowing down 
process/thread working on other core. For now it is ok for independent 
multiprocessor bad for multicore-freq-dependent. 


temporary dirty patch works for me - your result my vary (for shure it will 
not work for multi-processor/dualcore - we need identify and pair cores to 
do same thing) 


 --- cpufreq_ondemand.c-org	2006-07-05 23:09:49.000000000 -0500
+++ cpufreq_ondemand.c	2006-07-14 15:50:56.000000000 -0500
@@ -39,6 +39,7 @@
  * All times here are in uS.
  */
 static unsigned int def_sampling_rate;
+static unsigned int load_max_core=0;
 #define MIN_SAMPLING_RATE_RATIO			(2)
 /* for correct statistics, we need at least 10 ticks between each measure 
*/
 #define MIN_STAT_SAMPLING_RATE			(MIN_SAMPLING_RATE_RATIO * 
jiffies_to_usecs(10))
@@ -268,6 +269,8 @@ static void dbs_check_cpu(struct cpu_dbs
 			idle_ticks = tmp_idle_ticks;
 	}
 	load = (100 * (total_ticks - idle_ticks)) / total_ticks;
+	if (load_max_core > load)
+		load = load_max_core;

 	/* Check for frequency increase */
 	if (load > dbs_tuners_ins.up_threshold) {
@@ -297,6 +300,7 @@ static void dbs_check_cpu(struct cpu_dbs

 		__cpufreq_driver_target(policy, freq_next, CPUFREQ_RELATION_L);
 	}
+load_max_core = 0;
 }

 static void do_dbs_timer(void *data) 


 --------------------------------------------------- 

after this patch dualcore-AMD is working OK max speed for 100% utilization 
on core1 and 0% utilization on core2 


xboom
art@usfltd.com

             reply	other threads:[~2006-07-14 22:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-14 22:42 art [this message]
2006-07-15  7:05 Starikovskiy, Alexey Y

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=20060714224204.31311.qmail@mail.webhostingstar.com \
    --to=art@usfltd.com \
    --cc=akpm@osdl.org \
    --cc=alexey.y.starikovskiy@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=torvalds@osdl.org \
    --cc=venkatesh.pallipadi@intel.com \
    /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

Powered by JetHome