diff options
author | Daniel Black <daniel@linux.vnet.ibm.com> | 2018-03-23 12:58:11 +1100 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2018-03-29 18:55:18 +0400 |
commit | 402c7584a81c6c2bca00ae7890d501221c5f8096 (patch) | |
tree | ffd34eb83e69b959981f24aca8df2368f30c7935 /mysys/my_largepage.c | |
parent | 014dfe473a10c79bb476833db915cb586c3b0fd8 (diff) | |
download | mariadb-git-402c7584a81c6c2bca00ae7890d501221c5f8096.tar.gz |
MDEV-13785: move defination HAVE_LARGE_PAGES -> HAVE_LINUX_LARGE_PAGES
HAVE_LARGE_PAGES was always Linux but now there is
HAVE_SOLARIS_LARGE_PAGES in the code base. Innodb was using HAVE_LINUX_LARGE_PAGES
so keep this consistent everywhere.
Test plan:
$ grep Hugepagesize: /proc/meminfo
Hugepagesize: 2048 kB
$ sudo sysctl vm.nr_hugepages=1024
vm.nr_hugepages = 1024
$ sudo sysctl kernel.shmmax=$(( 2 * 1024 *1024 * 1024 ))
kernel.shmmax = 2147483648
No errors in ouput:
$ sql/mysqld --skip-networking --datadir=/tmp/datadir --log-bin=/tmp/datadir/mysqlbin --socket /tmp/s.sock --lc-messages-dir=${PWD}/sql/share --verbose --large-pages=1
2018-03-23 12:51:18 139697428129984 [Note] sql/mysqld (mysqld 10.2.14-MariaDB-log) starting as process 25406 ...
2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Uses event mutexes
2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Compressed tables use zlib 1.2.11
2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Using Linux native AIO
2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Number of pools: 1
2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Using SSE2 crc32 instructions
2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Completed initialization of buffer pool
2018-03-23 12:51:18 139696883590912 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Highest supported file format is Barracuda.
2018-03-23 12:51:18 139697428129984 [Note] InnoDB: 128 out of 128 rollback segments are active.
2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Creating shared tablespace for temporary tables
2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2018-03-23 12:51:18 139697428129984 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2018-03-23 12:51:18 139697428129984 [Note] InnoDB: 5.7.21 started; log sequence number 1620099
2018-03-23 12:51:18 139696713733888 [Note] InnoDB: Loading buffer pool(s) from /tmp/datadir/ib_buffer_pool
2018-03-23 12:51:18 139696713733888 [Note] InnoDB: Buffer pool(s) load completed at 180323 12:51:18
2018-03-23 12:51:18 139697428129984 [Note] Plugin 'FEEDBACK' is disabled.
2018-03-23 12:51:18 139697428129984 [Note] Reading of all Master_info entries succeded
2018-03-23 12:51:18 139697428129984 [Note] Added new Master_info '' to hash table
2018-03-23 12:51:18 139697428129984 [Note] sql/mysqld: ready for connections.
Version: '10.2.14-MariaDB-log' socket: '/tmp/s.sock' port: 0 Source distribution
$ grep -i huge /proc/25406/smaps | grep -v ' 0 kB'
Private_Hugetlb: 8192 kB
Private_Hugetlb: 2048 kB
$ grep huge /proc/25406/numa_maps
7f0d74400000 default file=/SYSV00000000\040(deleted) huge
7f0dbd200000 default file=/SYSV00000000\040(deleted) huge dirty=4 N0=4 kernelpagesize_kB=2048
7f0dc5600000 default file=/SYSV00000000\040(deleted) huge
7f0dd1200000 default file=/SYSV00000000\040(deleted) huge dirty=1 N0=1 kernelpagesize_kB=2048
$ grep Huge /proc/meminfo
AnonHugePages: 0 kB
ShmemHugePages: 0 kB
HugePages_Total: 940
HugePages_Free: 935
HugePages_Rsvd: 177
HugePages_Surp: 0
Hugepagesize: 2048 kB
Ran again with --memlock
(note needs ulimit -l > size)
$ grep Huge /proc/meminfo
AnonHugePages: 0 kB
ShmemHugePages: 0 kB
HugePages_Total: 940
HugePages_Free: 758
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
$ grep huge /proc/26020/numa_maps
7fe870400000 default file=/SYSV00000000\040(deleted) huge dirty=62 N0=62 kernelpagesize_kB=2048
7fe8b3a00000 default file=/SYSV00000000\040(deleted) huge dirty=66 N0=66 kernelpagesize_kB=2048
7fe8bd600000 default file=/SYSV00000000\040(deleted) huge dirty=53 N0=53 kernelpagesize_kB=2048
7fe8c8400000 default file=/SYSV00000000\040(deleted) huge dirty=1 N0=1 kernelpagesize_kB=2048
$ grep -i huge /proc/26020/smaps | grep -v ' 0 kB'
Private_Hugetlb: 126976 kB
Private_Hugetlb: 135168 kB
Private_Hugetlb: 108544 kB
Private_Hugetlb: 2048 kB
Diffstat (limited to 'mysys/my_largepage.c')
-rw-r--r-- | mysys/my_largepage.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mysys/my_largepage.c b/mysys/my_largepage.c index 59f815a9d87..dab63ae3817 100644 --- a/mysys/my_largepage.c +++ b/mysys/my_largepage.c @@ -15,7 +15,7 @@ #include "mysys_priv.h" -#ifdef HAVE_LARGE_PAGES +#ifdef HAVE_LINUX_LARGE_PAGES #ifdef HAVE_SYS_IPC_H #include <sys/ipc.h> @@ -163,4 +163,4 @@ my_bool my_large_free_int(uchar *ptr) } #endif /* HAVE_DECL_SHM_HUGETLB */ -#endif /* HAVE_LARGE_PAGES */ +#endif /* HAVE_LINUX_LARGE_PAGES */ |