From: Jamie Lokier <jamie@shareable.org>
To: Andy Isaacson <adi@hexapodia.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: avoiding dirty code pages with fixups
Date: Sat, 7 Feb 2004 00:13:17 +0000 [thread overview]
Message-ID: <20040207001317.GE12503@mail.shareable.org> (raw)
In-Reply-To: <20040203225453.GB18320@hexapodia.org>
Andy Isaacson wrote:
> This is sorta like MAP_PRIVATE, but instead of writing the dirty
> page out to the swapfile, I want the page never to leave RAM. If
> the kernel decides to evict the page, it should just drop it and
> invalidate the virtual address range. When my program faults it
> back in, provide me with the contents of the page *as they exist in
> the backing file*.
That idea has come up about a thousand million times. Well, three.
It's a good one :)
It has lots of uses, not just the one you describe. For example,
cacheing generated image data.
It would also be nice for a memory allocator to be able to convert a
region from MAP_PRIVATE to MAP_SCRATCH and back, so that freed blocks
of memory can be reclaimed by the system but only when there is memory
pressure.
> The downside is the additional computation on page-in.
> It is a function of how many fixups there are per page, and of how
> much work ld.so does to satisfy a fixup. I don't have a good feel
> for how expensive ld.so's fixup mechanism is... any comments?
The other downside of your idea is that every instance of a program
has more dirty pages. While it is true that the pages do not require
disk I/O, they still take up RAM that could be used for other page
cache things.
-- Jamie
next prev parent reply other threads:[~2004-02-07 0:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-03 22:54 Andy Isaacson
2004-02-07 0:13 ` Jamie Lokier [this message]
2004-02-07 3:03 ` Andy Isaacson
2004-02-07 3:33 ` Jamie Lokier
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=20040207001317.GE12503@mail.shareable.org \
--to=jamie@shareable.org \
--cc=adi@hexapodia.org \
--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
all inboxes | Powered by JetHome®