Re: VM tuning through fault trace gathering [with actual code]

From: Marcelo Tosatti (
Date: Mon Jun 25 2001 - 19:53:33 EST

On 25 Jun 2001, John Fremlin wrote:

> Last year I had the idea of tracing the memory accesses of the system
> to improve the VM - the traces could be used to test algorithms in
> userspace. The difficulty is of course making all memory accesses
> fault without destroying system performance.
> The following patch (i386 only) will dump all page faults to
> /dev/biglog (you need devfs for this node to appear). If you echo 1 >
> /proc/sys/vm/trace then *almost all* userspace memory accesses will
> take a soft fault. Note that this is a bit suicidal at the moment
> because of the staggeringly inefficient way its implemented, on my box
> (K6-2 300MHz) only processes which do very little (e.g. /usr/bin/yes)
> running at highest priority are able to print anything to the console.
> I think the best way would be to have only one valid l2 pte per
> process. I'll have a go at doing that in a day or two unless someone
> has a better idea?

Linux Trace Toolkit ( does that.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sat Jun 30 2001 - 21:00:13 EST