linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Olaf Hering <olh@suse.de>
To: linux-kernel@vger.kernel.org
Subject: pin files in memory after read
Date: Mon, 3 Jan 2005 19:07:18 +0100	[thread overview]
Message-ID: <20050103180718.GA22138@suse.de> (raw)


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.


             reply	other threads:[~2005-01-03 18:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-03 18:07 Olaf Hering [this message]
2005-01-03 18:24 ` pin files in memory after read Arjan van de Ven
2005-01-04  0:04   ` Olaf Hering
2005-01-04  0:21     ` Chris Wright

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=20050103180718.GA22138@suse.de \
    --to=olh@suse.de \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).