grub-devel
[Top][All Lists]
Advanced

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

Idle time


From: Marco Gerards
Subject: Idle time
Date: Mon, 06 Feb 2006 21:39:10 +0100
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Hi,

When GRUB is idle (for example, waiting for keyboard input) it is
very active with busy waiting.  This has some problems and besides
that, we can make good use of this time.

First the problems.  One GRUB user on some IRC channel I am in was
complaining that GRUB on qemu consumed a lot of CPU power.  He was
entering GRUB commands on the GRUB console and his machine got slow.
With a timeout GRUB will consume power on laptops.  Perhaps it's not
much, but it would be nice if we could fix this somehow.

My main motivation is that it would be nice if sometimes events can be
handled.  For example, Okuji and Vincent were talking about the play
command and how it should keep playing music in the background.  My
motivation to ask this is to handle network events (ARP and ICMP).

Although it is not very important to handle those events, it can be
nice and is efficient and easy to do.  Here is some proposed function
and interface:

void grub_idle (int msec);

When this function is called, GRUB will be idle for about MSEC
milliseconds.  When nothing can be sanely done with this time, some
machine specific function is called instead of an idle loop.
Otherwise some functions will be called that can be registered to run
during idle time.  But the next function will not be called it MSECS
have passed.

So we need some functions to register and deregister callback
functions.  And in input loops we have to add grub_idle.  That's all
and it will fix the problems above and give us a nice feature (one
that should be handled with a *LOT* of care).

Please let me know if you have problems with such interface.

--
Marco





reply via email to

[Prev in Thread] Current Thread [Next in Thread]