root# sysctl debug.cpufreq.lowest=1000
としてやる. /etc/sysctl.conf に書き込めばシステム起動時から設定ができる. こんなのも知らんとはまだまだ僕も未熟やのう.
研究とかLinuxとかプログラミングの話をダラダラ書いてます。 昔はFreeBSDのことも書いていましたが、最近Linuxに変えてしまいました。
root# sysctl debug.cpufreq.lowest=1000
r = (int) ((len - i - 1) * (float) rand() / (RAND_MAX + 1.0)) + i + 1;
$ cd ~/micropolis
$ patch -p2 < micropolis_freebsd.patch
$ cd src
$ make all install
$ cd ..
$ ./Micropolis
pkill -9 acroreadとしても強制終了できなかったこと. ps auxw で確認したら,
/lib/ld-linux.so.2 /usr/local/Adobe/Reader8/JPN/Adobe/Reader8/Reader/inteと出たので,
llinux/bin/acroread hoge.pdf (ld-2.3.6.so)
pkill -9 ld-2.3.6.so
http://fpdownload.macromedia.com/get/flashplayer/installers/archive/fp7_archive.zip
--- powerd.c.orig 2008-01-07 21:57:28.000000000 +0900
+++ powerd.c 2008-01-07 22:15:45.000000000 +0900
@@ -95,6 +95,9 @@
static int apm_fd;
static int exit_requested;
+/* Minimum CPU Frequency */
+static int cpu_min_freq = 0;
+
static int
read_usage_times(long *idle, long *total)
{
@@ -249,7 +252,7 @@
{
fprintf(stderr,
-"usage: powerd [-v] [-a mode] [-b mode] [-i %%] [-n mode] [-p ival] [-r %%] [-P pidfile]\n");
+"usage: powerd [-v] [-a mode] [-b mode] [-i %%] [-n mode] [-p ival] [-r %%] [-P pidfile] [-x min_freq]\n");
exit(1);
}
@@ -277,7 +280,7 @@
if (geteuid() != 0)
errx(1, "must be root to run");
- while ((ch = getopt(argc, argv, "a:b:i:n:p:P:r:v")) != EOF)
+ while ((ch = getopt(argc, argv, "a:b:i:n:p:P:r:x:v")) != EOF)
switch (ch) {
case 'a':
parse_mode(optarg, &mode_ac, ch);
@@ -317,6 +320,9 @@
case 'v':
vflag = 1;
break;
+ case 'x':
+ cpu_min_freq = atoi(optarg);
+ break;
default:
usage();
}
@@ -459,7 +465,10 @@
warn("read_usage_times() failed");
continue;
}
-
+ if(curfreq < cpu_min_freq){
+ set_freq(cpu_min_freq);
+ curfreq = cpu_min_freq;
+ }
/*
* If we're idle less than the active mark, bump up two levels.
* If we're idle more than the idle mark, drop down one level.
@@ -482,7 +491,7 @@
warn("error setting CPU frequency %d",
freqs[i]);
} else if (idle > (total * cpu_idle_mark) / 100 &&
- curfreq > freqs[numfreqs - 1]) {
+ curfreq > freqs[numfreqs - 1] && freqs[i + 1] >= cpu_min_freq) {
i++;
if (vflag) {
printf("idle time > %d%%, decreasing clock"
rm -rf compat4x/work/var/empty
rm: empty: Operation not permitted
ls -lo
chflags noschg empty
rm -r empty
Option "Xkboptions" "ctrl:nocaps"