Re: [PATCH 1/4] x86_64: Switch to SPARSE_VIRTUAL

Christoph Lameter
2007-04-05T18:27:53Z

On Thu, 5 Apr 2007, Andy Whitcroft wrote:

> Christoph if you could let us know which benchmarks you are seeing gains
> with that would be a help.

You saw the numbers that Ken got with the pipe test right?

Then there are some minor improvements if you run AIM7.

I got into this because I saw the code that was generated by sparsemem and
discontig. Sparsemem was doing a series of lookups and so did pure
discontig on x86_64. Both were really too complex for inlining.
Discontig/Vmemmap on IA64 was sort of cleaner but there was still a
reference to a variable plus it was creating the needs for lots of TLBs.

These VM primitives are pretty critical and the code for those needs to be
minimal and inline. So I removed the variable ref from discontig/Vmemmap
and reduced the wokr to be done to the simple formula (that I also found
in textbooks on memmap management). Avoided the TLB pressure by using the
1-1 mappings page size.

I could get real some performance numbers for this by sticking in a
performance counter before and after virt_to_page and page_address. But I
am pretty sure about the result just looking at the code.