Messages in this thread | | | Date | Tue, 11 Jun 1996 15:12:46 +0300 (EET DST) | From | Linus Torvalds <> | Subject | Re: 2.0, loggings, cpu quotas, 2.1 issues, etc. |
| |
> > BUT... opening files in /proc sometimes up to 3 times a second does not > > wear well for the system CPU load. A kernel feature would work immensely > > better. > > I appear to be able to open files in /proc a good 50 times a second before > its noticed even slightly on the lod average
Also, if you have a program that opens the same file over and over again, you might just consider _keeping_ it open and just doing a lseek() to the start of the file..
Also, programs that open lots of files repeatedly (like top), and can't just keep them all open (because the processes change, for example) might want to consider doing a 'chdir("/proc");' first, and then use relative names. That avoids a filesystem lookup and mount point change. That's not a very big deal, but if people feel it's slow, there are these kinds of trivial optimizations you can look into..
Linus
| |