lkml.org 
[lkml]   [2002]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Asynchronous CDROM Events in Userland
On Mon, 4 Feb 2002, H. Peter Anvin wrote:

> Stevie O wrote:
>
> > At 09:07 PM 2/3/2002 -0800, H. Peter Anvin wrote:
> >
> >> Rather than a signal, it should be a file descriptor of some sort, so
> >> one can select() etc on it. Personally I can't imagine polling would
> >> take any appreciable amount of resources, though.
> >
> >
> > Windows 95 polls the cd-rom drive for autorun.
> > It kills laptop batteries REAL quick.
> > CPU & memory aren't the only resources...
> >
>
> Does it spin up the CD-ROM doing so?
>
> -hpa

Probably it doesn't, but just having the cpu be non-idle when it could
otherwise be idle does add up over time. In linux, polling the cdrom
*seems* inexpensive enough, but if you look at 'top' it seems to average
out to like 1-2% cpu time! (Ok, these stats aren't super-accurate,
they're just from running 'top' with the kde autorun tool running).

[Admitedly, the autorun tool is written kind of strangely (it does one
redundant ioctl, plus it wait()s on its children constantly rather than
installing a signal handler), but still.. it would be nice to get those
extra cycles for quake3 or wolfenstein...]

-Calin

>
> -
> 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/
>

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:23    [W:0.041 / U:7.524 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site