From: Marco Gerards <mgerards@xs4all.nl>
To: grub-devel@gnu.org
Subject: Idle time
Date: Mon, 06 Feb 2006 21:39:10 +0100 [thread overview]
Message-ID: <87y80ow7bl.fsf@xs4all.nl> (raw)
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
next reply other threads:[~2006-02-06 20:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-06 20:39 Marco Gerards [this message]
2006-02-09 22:34 ` Idle time Yoshinori K. Okuji
2006-04-16 19:00 ` Marco Gerards
2006-04-16 20:22 ` Yoshinori K. Okuji
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y80ow7bl.fsf@xs4all.nl \
--to=mgerards@xs4all.nl \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.