Once upon a time, when kernel 2.2.13 was the bleeding-edge of the stable
tree, my processor was experiencing heat-related problems. I dealt with
this as any proactively lazy person would, in that instead of buying a
new heat sink, i modified my kernel to deal with the issue, and wrote a
small command-line program as an interface.
This modification added a new resource limit to the kernel, RLIMIT_TCPU,
allowing the user to impose time penalties (in jiffies) on a process
that reaches a set amount of cpu time (in 1/100 of a cpu second). It
was a simple algorithm, but it functioned satisfactorily, and it
remained incredibly useful to me for some time. Eventually, i bought a
new heat sink and high silver content thermal compound, and felt no need
to port this modification to future kernel releases.
The topic of heat-related issues came up in conversation recently, and a
comment about my modification followed suit (this comment came from me,
of course, reminiscently). The person to whom i spoke iterated how
useful such a thing could be, further requesting that i send the patch
on to the linux kernel mailing list. The rest can be inferred.
'Twas a quick hack, and rather dirty. It wasn't designed for
multiprocessor systems, but it will likely handle them... acceptably.
It should also function (and compile) only on i386-based processors, as
i did not modify resource.h in other processor-specific include
directories (this should be terribly easy to change, as the actual
modifications are not processor-specific). Regardless, it served me
well, and perhaps in some form it may live to serve another.
The patch and the program are now available at:
http://www.episec.com/people/edelkind/patches/kernel/
Usage is given there as well.
ari
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/