diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-01-03 09:44:44 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-01-03 09:44:44 +0200 |
commit | 4c610d10d400938481e418d8798279d61ff41d26 (patch) | |
tree | 803d0e1f961c6c2148f53f0b3d150af3a6f09f15 /storage/innobase/buf | |
parent | efcd0935f77c1080cf00f86e70f28b8a74762475 (diff) | |
download | mariadb-git-4c610d10d400938481e418d8798279d61ff41d26.tar.gz |
Post-fix for MDEV-11195 NUMA does not get enabled even when checks are passed
The C preprocessor symbol WITH_NUMA is never defined. Instead, the symbol
HAVE_LIBNUMA is used for checking if the feature is to be used.
If cmake -DWITH_NUMA=OFF is specified, HAVE_LIBNUMA will not be defined
at compilation time even if the library is available.
If cmake -DWITH_NUMA=ON is specified but the library is not available
at configuration time, the compilation will be aborted.
Diffstat (limited to 'storage/innobase/buf')
-rw-r--r-- | storage/innobase/buf/buf0buf.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc index 935b7fadafa..638126f8de1 100644 --- a/storage/innobase/buf/buf0buf.cc +++ b/storage/innobase/buf/buf0buf.cc @@ -2,7 +2,7 @@ Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. -Copyright (c) 2013, 2016, MariaDB Corporation. All Rights Reserved. +Copyright (c) 2013, 2017, MariaDB Corporation. All Rights Reserved. Portions of this file contain modifications contributed and copyrighted by Google, Inc. Those modifications are gratefully acknowledged and are described @@ -85,7 +85,7 @@ Created 11/5/1995 Heikki Tuuri #include "lzo/lzo1x.h" #endif -#if defined(HAVE_LIBNUMA) && defined(WITH_NUMA) +#ifdef HAVE_LIBNUMA #include <numa.h> #include <numaif.h> struct set_numa_interleave_t @@ -126,7 +126,7 @@ struct set_numa_interleave_t #define NUMA_MEMPOLICY_INTERLEAVE_IN_SCOPE set_numa_interleave_t scoped_numa #else #define NUMA_MEMPOLICY_INTERLEAVE_IN_SCOPE -#endif /* HAVE_LIBNUMA && WITH_NUMA */ +#endif /* HAVE_LIBNUMA */ /* Enable this for checksum error messages. */ //#ifdef UNIV_DEBUG @@ -1608,7 +1608,7 @@ buf_chunk_init( return(NULL); } -#if defined(HAVE_LIBNUMA) && defined(WITH_NUMA) +#ifdef HAVE_LIBNUMA if (srv_numa_interleave) { struct bitmask *numa_mems_allowed = numa_get_mems_allowed(); int st = mbind(chunk->mem, chunk->mem_size(), @@ -1622,7 +1622,7 @@ buf_chunk_init( " (error: " << strerror(errno) << ")."; } } -#endif /* HAVE_LIBNUMA && WITH_NUMA */ +#endif /* HAVE_LIBNUMA */ /* Allocate the block descriptors from |