Re: avoiding dirty code pages with fixups

From: Jamie Lokier
Date: Fri Feb 06 2004 - 22:34:30 EST


Andy Isaacson wrote:
> On Sat, Feb 07, 2004 at 12:13:17AM +0000, Jamie Lokier wrote:
> > > 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.
>
> Well, in the case I describe, currently they're done with MAP_PRIVATE
> mappings, so it's no net loss.

Ok, that's a good point.

When you brought it up in the context of our vsyscall fla^H^H^Hdebate,
I assumed you meant to use this as a technique to help fixing up more
code pointers at run time, to convert indirect jumps to direct ones.
That does dirty more pages.

Your idea of the reverted pages conveniently containing the right code
to get them patched again is quite clever, imho.

-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/