[x264-devel] Transparent hugepage support

Henrik Gramner git at videolan.org
Fri Aug 23 23:06:32 CEST 2013


x264 | branch: master | Henrik Gramner <henrik at gramner.com> | Mon Jul  8 12:06:42 2013 -0700| [b690d473359b4ac7f8e72244af67014cc41b7953] | committer: Jason Garrett-Glaser

Transparent hugepage support

Combine frame and mb data mallocs into a single large malloc.
Additionally, on Linux systems with hugepage support, ask for hugepages on
large mallocs.

This gives a small performance improvement (~0.2-0.9%) on systems without
hugepage support, as well as a small memory footprint reduction.

On recent Linux kernels with hugepage support enabled (set to madvise or
always), it improves performance up to 4% at the cost of about 7-12% more
memory usage on typical settings..

It may help even more on Haswell and other recent CPUs with improved 2MB page
support in hardware.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=b690d473359b4ac7f8e72244af67014cc41b7953
---

 common/common.c     |   23 ++++++-
 common/common.h     |   26 ++++++++
 common/frame.c      |  177 ++++++++++++++++++++++++++-------------------------
 common/frame.h      |    1 +
 common/macroblock.c |   69 ++++++++++----------
 configure           |    7 +-
 encoder/encoder.c   |    2 +-
 7 files changed, 178 insertions(+), 127 deletions(-)

Diff:   http://git.videolan.org/gitweb.cgi/x264.git/?a=commitdiff;h=b690d473359b4ac7f8e72244af67014cc41b7953


More information about the x264-devel mailing list