Re: process priority

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sunday 05 April 2009 19:21:29 Howard Chu wrote:
> Sorry if this has been discussed before; I can't seem to find an archive for 
> this list.
> 
> Do any of the available speed governors take process priority into account? 
> E.g., I'd like to run Folding@Home in the background on my machine. I want it 
> to run at low priority, and get 100% of the CPU when the machine is otherwise 
> idle. But, I don't want the CPU's speed to increase because of this one busy 
> process. On the other hand, if I'm doing any other CPU-intensive work, I want 
> the CPU speed to increase as usual.
> 
> I.e., I'd like to be able to run these CPU-intensive background jobs but not 
> at max speed/max power consumption.
The ondemand governor can be configured to calculate nice load of a process
as CPU or idle load:
echo [01] >/sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice_load

There was a bug in these parts recently which made it into 2.6.29:
commit 1ca3abdb6a4b87246b00292f048acd344325fd12
Author: Venkatesh Pallipadi <venkatesh.pallipadi@xxxxxxxxx>
Date:   Fri Jan 23 09:25:02 2009 -0500

    [CPUFREQ] Make ignore_nice_load setting of ondemand work as expected.

The bug was introduced with the micro accounting things, which AFAIK
came in with 2.6.28. I am not sure, but it could be that 2.6.28 still
suffers from that bug. Eventually above patch should be sent to stable@xxxxxxxxxx
now, don't know.

Start a process with nice factor and have a look at top (hit "1" if you have a
multi core system). The nice time (%ni),
one of the major accounted values on the top will, depending on above ondemand config
variable, be counted as CPU load or idle time (at least it was implemented
like that in the userspace governor(s), I expect ondemand is doing the same).

    Thomas
--
To unsubscribe from this list: send the line "unsubscribe cpufreq" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Devel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Forum]     [Linux SCSI]

  Powered by Linux