From: Arjan van de Ven <arjan@infradead.org>
To: Olaf Hering <olh@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: pin files in memory after read
Date: Mon, 03 Jan 2005 19:24:40 +0100 [thread overview]
Message-ID: <1104776680.4192.20.camel@laptopd505.fenrus.org> (raw)
In-Reply-To: <20050103180718.GA22138@suse.de>
On Mon, 2005-01-03 at 19:07 +0100, Olaf Hering wrote:
> 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.
you could write a small userspace daemon that mmaps the file and mlock's
it....
next prev parent reply other threads:[~2005-01-03 18:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-03 18:07 Olaf Hering
2005-01-03 18:24 ` Arjan van de Ven [this message]
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=1104776680.4192.20.camel@laptopd505.fenrus.org \
--to=arjan@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=olh@suse.de \
/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
all inboxes | Powered by JetHome®