public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* pin files in memory after read
@ 2005-01-03 18:07 Olaf Hering
  2005-01-03 18:24 ` Arjan van de Ven
  0 siblings, 1 reply; 4+ messages in thread
From: Olaf Hering @ 2005-01-03 18:07 UTC (permalink / raw)
  To: linux-kernel


Is there a way to always keep a file (once read from disk) in memory, no
matter how much memory pressure exists?
There are always complains that updatedb and similar tools wipe out all
caches. So I guess there is no such thing yet.

I simply want to avoid the spinup of my ibook harddisk when something
has been 'forgotten' and must be loaded again (like opening a new screen
window after a while).

The best I could do so far was a cramfs image. I copied it to tmpfs
during early boot, then mount -o bind every cramfs file over the real
binary on disk. Of course that will fail as soon as I want to update an
affected package because the binary is busy (readonly). So there must be
a better way to achieve this.

How can one tell the kernel to pin a file in memory once it was read?
Maybe with an xattr or something?
Unfortunately I dont know about the block layer and other things
involved, so I cant attach a patch that does what I want.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-01-04  0:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-03 18:07 pin files in memory after read Olaf Hering
2005-01-03 18:24 ` Arjan van de Ven
2005-01-04  0:04   ` Olaf Hering
2005-01-04  0:21     ` Chris Wright

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox