Large page support in the Linux Kernel?

From: Buddy Lumpkin
Date: Sat May 01 2004 - 04:24:42 EST


I was wondering if there is going to be large page support for the linux
kernel in the near future. I am sure most people know the benefit this has
for large databases like Oracle, ultimately larger pages means the TLB slots
refer to a much larger area of memory increasing the chance of a TLB hit and
avoiding the need to walk the page tables in the MMU.

I have spotted a few previous threads where fragmentation and the complexity
in making these pages such that they can be evicted were offered as reasons
to defer this feature. I think this is a mistake.

In Solaris, the first large page support was added to the shared memory
segment driver and called Intimate Shared Memory. ISM uses 4MB pages, and is
a segment that is locked in memory (non-pagable). Solaris hasn't done
anything to address fragmentation as far as I know until recently in Solaris
9 (ISM has been available since 2.6, maybe prior).

I have seen many cases where a DBA shuts down an Oracle instance, but cannot
restart it because significant memory use has taken place since the instance
was shut down (filesystem backed pages read into the page cache, malloc,
free, etc..), and in these cases, there was plenty of available memory on
the system to handle the request for the ISM segment. In most Oracle
installations, the SGA is allocated with an ISM segment that stays resident
for entire duration that the Oracle instance is running. This is hardly a
case where fragmentation is going to cause an issue since normal 4k or 8k
pages are allocated easily in the presence of this segment.

To a kernel programmer, the fragmentation and paging issues may seem like a
big issue, but any DBA I know would happily make this tradeoff on their
production databases for the additional performance that large pages offers.

If fragmentation isn't a big deal, and pages can be locked in memory, are
large pages still a difficult feature to add to the linux kernel?

Lastly, I know I have mentioned Oracle and Solaris a lot. Please don't flame
me for this, I think the points I am trying to make are reasonable.

Regards,

--Buddy



-
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/