Re: [PATCH -mm] vmscan: make mapped executable pages the firstclass citizen

From: Andrew Morton
Date: Fri May 08 2009 - 18:24:15 EST


On Fri, 8 May 2009 23:00:45 +0100
Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> wrote:

> > The patch seems reasonable but the changelog and the (non-existent)
> > design documentation could do with a touch-up.
>
> Is it right that I as a user can do things like mmap my database
> PROT_EXEC to get better database numbers by making other
> stuff swap first ?
>
> You seem to be giving everyone a "nice my process up" hack.

Yep.

But prior to 2.6.27(?) the same effect could be had by mmap()ing the
file with or without PROT_EXEC. The patch restores a
probably-beneficial heuristic which got lost in the LRU rewrite.

So we're no worse than pre-2.6.27 kernels here. Plus there are
probably more effective ways of getting that sort of boost, such as
having a process running which simply touches your favoured pages
at a suitable (and fairly low) frequency.
--
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/