[KLUG Members] Laptop Linux users

members@kalamazoolinux.org members@kalamazoolinux.org
Fri, 18 Oct 2002 16:59:40 -0400


>>>Keeping the fd open though dup()ing it and seek()ing back to the beginning
>>>would let you re-read the file though w/out that disk hit. Little tricks
>>>like that scattered about the core gnome apps might do a lot to keep the
>>>battery running a lot longer.
>>Fascinating.  Maybe open in glibc is checking xtab or some 
>>other status file?
>Nah... it has to figure out how to open up proc first, so you have to open up
>a handle to / and then loop through it to find the 'proc' entry, which then
>begins your journey into memory-only space.  / lives on the disk though, so
>to get that inode open you've got to ask the little magnetic platter.

Nah... I don't buy it.  Path walking takes place non-stop, opening any file goes
through the same process.  The inode and contents of "/" are almost certainly
in-buffer,  and certainly wouldn't go out-buffer every five minutes unless your
starved for RAM, in which case your drive would be grinding.

Possibly bdflush could be adjusted to make it lazier.