Change default chunk size from 256 KiB to 2 MiB.

This change improves interaction with transparent huge pages, e.g.
reduced page faults (at least in the absence of unused dirty page
purging).
This commit is contained in:
Jason Evans 2015-07-15 17:15:26 -07:00
parent aa2826621e
commit 5bd879646c
2 changed files with 2 additions and 2 deletions

View File

@ -907,7 +907,7 @@ for (i = 0; i < nbins; i++) {
<listitem><para>Virtual memory chunk size (log base 2). If a chunk <listitem><para>Virtual memory chunk size (log base 2). If a chunk
size outside the supported size range is specified, the size is size outside the supported size range is specified, the size is
silently clipped to the minimum/maximum supported size. The default silently clipped to the minimum/maximum supported size. The default
chunk size is 256 KiB (2^18). chunk size is 2 MiB (2^21).
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>

View File

@ -5,7 +5,7 @@
* Size and alignment of memory chunks that are allocated by the OS's virtual * Size and alignment of memory chunks that are allocated by the OS's virtual
* memory system. * memory system.
*/ */
#define LG_CHUNK_DEFAULT 18 #define LG_CHUNK_DEFAULT 21
/* Return the chunk address for allocation address a. */ /* Return the chunk address for allocation address a. */
#define CHUNK_ADDR2BASE(a) \ #define CHUNK_ADDR2BASE(a) \