ClaireTan0216 / memcached

Automatically exported from code.google.com/p/memcached
0 stars 0 forks source link

Missing HugeTLB support under Linux #264

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Maybe I'm just missing something but it looks like memcached 1.4 is not able to 
use HugeTLB under Linux. Configure script looks for libhugetlbfs and also 
checks whether getpagesizes() and memcntl() are available. getpagesizes() is 
supported by libhugetlbfs but memcntl() is not available under Linux. However, 
existence of these functions is a requirement for -L option to work:

static int enable_large_pages(void) {
#if defined(HAVE_GETPAGESIZES) && defined(HAVE_MEMCNTL)
[...]

I don't know whether this is a bug or just a missing feature. I was unable to 
find any information about this.

Original issue reported on code.google.com by piotr.st...@nokaut.pl on 6 Apr 2012 at 6:30

GoogleCodeExporter commented 9 years ago
You are correct in that it's a missing feature. Nobody's sat down to make linux 
HugeTLB's work (and test them!) and we haven't had many requests to do so.

It would be nice to get in during the next few months. it isn't much code, but 
it still needs to be tested.

Original comment by dorma...@rydia.net on 10 Apr 2012 at 10:56

GoogleCodeExporter commented 9 years ago
I added this support for Linux via mmap() + MAP_HUGETLB.

It was used in production for about 6 months to get us out of a jam.

Being a time-sensitive hack, the patches are ugly, but if there's still 
interest, I'll clean them up for a proper pull request.

Original comment by johns...@gmail.com on 29 Sep 2013 at 2:05