All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Bidewell <mark.bidewell@alumni.clemson.edu>
To: Bruno Ducrot <ducrot@poupinou.org>
Cc: cpufreq@lists.linux.org.uk
Subject: Re: Possible CPUFreq governor
Date: Wed, 27 Apr 2005 08:25:12 -0400	[thread overview]
Message-ID: <426F84A8.7040000@alumni.clemson.edu> (raw)
In-Reply-To: <20050427105350.GX2298@poupinou.org>

Thank you very much for your imput.  I will make those adjustments in 
the next patch.  The temperature was obtained by reading 
/proc/acpi/thermal_zone/THM/temperature  for a usermode daemon. 

The primary problem I see with integrating this code as part of 
userspace is the fact that userspace can be a module.  This code 
includes the addition of a function call in the schedule() function:

*diff -Nur linux-2.6.11.6/kernel/sched.c linux-sysfs/kernel/sched.c
--- linux-2.6.11.6/kernel/sched.c	2005-03-25 22:28:26.000000000 -0500
+++ linux-sysfs/kernel/sched.c	2005-04-06 22:55:33.000000000 -0400
@@ -2822,6 +2822,12 @@
 	prev = current;
 	if (unlikely(reacquire_kernel_lock(prev) < 0))
 		goto need_resched_nonpreemptible;
+	/*
+	 * Put thermal stuff here
+	 */
+	#ifdef CONFIG_CPU_FREQ_GOV_TEMPSCALE
+		scale_proc_freq(next, TASK_INTERACTIVE(next));
+	#endif
 	preempt_enable_no_resched();
 	if (unlikely(test_thread_flag(TIF_NEED_RESCHED)))
 		goto need_resched;
*


If the tempscale code were pulled out of the kernel (via rmmod), I think 
that would invalidate the call.  A second problem would be that the call 
would not be valid prior to module loading.  I have not been able to 
come up with any workarounds for this.  Are you aware of any?


Bruno Ducrot wrote:

>Hi,
>
>On Tue, Apr 26, 2005 at 07:39:29PM -0400, Mark Bidewell wrote:
>  
>
>>I am attaching a Linux kernel patch which supplies a new CPUFreq governor
>>for the CPUFreq interface.  It allows a user or daemon to reduce the
>>thermal output of a mobile processor by reducing the frequency at which
>>non-interactive processes are run.  It has been extensively tested on the
>>2.6.11.x kernels on a P4-M 3.2 GHz machine.
>>    
>>
>
>BTW how temperature is computed?
>
>I dont see any difference (apart the fact that you are setting frequency
>only for non-interactive processes) with the userspace governor.  If
>really you have to get this feature, I think you should consider to
>modify the userspace governor.
>
>
>  
>

  parent reply	other threads:[~2005-04-27 12:25 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-26 23:39 Possible CPUFreq governor Mark Bidewell
2005-04-27 10:53 ` Bruno Ducrot
2005-04-27 11:02   ` Bruno Ducrot
2005-04-27 11:08   ` Ivor Hewitt
2005-04-27 12:30     ` Mark Bidewell
2005-04-27 14:07       ` Bruno Ducrot
2005-04-27 16:20         ` Mark Bidewell
2005-04-27 17:38           ` Bruno Ducrot
2005-04-27 18:18             ` Mark Bidewell
2005-04-27 19:04               ` Bruno Ducrot
2005-05-02 12:51                 ` Mark Bidewell
2005-04-27 12:25   ` Mark Bidewell [this message]
2005-04-27 13:54     ` Bruno Ducrot
2005-04-27 16:10       ` Mark Bidewell
2005-04-27 17:03         ` Bruno Ducrot
2005-04-27 17:19           ` Mark Bidewell
2005-04-27 17:45             ` Bruno Ducrot
  -- strict thread matches above, loose matches on Subject: below --
2005-04-27  0:12 Mark Bidewell
2005-04-27  0:13 Mark Bidewell
2005-05-02 14:02 Pallipadi, Venkatesh
2005-05-02 14:30 ` Mark Bidewell

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=426F84A8.7040000@alumni.clemson.edu \
    --to=mark.bidewell@alumni.clemson.edu \
    --cc=cpufreq@lists.linux.org.uk \
    --cc=ducrot@poupinou.org \
    /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 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.