Re: reading files in /proc/acpi hangs machine for a short time

Stefan Seyfried
2004-06-25T21:11:17Z

On Fri, Jun 25, 2004 at 11:57:33PM +0800, Michael Frank wrote:

> >behaves normally. So it seems to me that accessing to files ini
> >/proc/acpi/bla/bla from C code or script behaves the same, it slows down
> >the
> >machine for a very short while, because of CPU eating.
>
> Should not be like that. I have not encountered it on 2.4

I have seen this in 2.4 kernels on e.g. asus l8400, reading the
battery. It even lead to "lost time" in the kernel clock (often
reading the battery slowed down the clock considerably). IIUC this
is caused by bad hardware design (battery controllers connected via
i2c or similar slow serial buses read with busy loops or something
ugly like that.
It seems this has been resolved in 2.6.

On some hardware, reading battery is still very expensive (causes small
peaks of high load in kernel space) on others it is not. At least i don't
think i saw the clock losing ticks in 2.6.

> Suggest you file a bug report in kernel bugzilla with details of you HW
> so it gets looked into. Get some details of which files cause the problems
> using the script and enclose the script as well.

I am not sure that there can be done much about this if the particular
hardware is badly designed.
--
Stefan Seyfried