Skip to content

Innodb: innodb_numa_interleave=1, use numa numa_get_mems_allowed #104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions storage/innobase/buf/buf0buf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,13 @@ struct set_numa_interleave_t
{
if (srv_numa_interleave) {

struct bitmask *numa_mems_allowed =
numa_get_mems_allowed();
ib::info() << "Setting NUMA memory policy to"
" MPOL_INTERLEAVE";
if (set_mempolicy(MPOL_INTERLEAVE,
numa_all_nodes_ptr->maskp,
numa_all_nodes_ptr->size) != 0) {
numa_mems_allowed->maskp,
numa_mems_allowed->size) != 0) {

ib::warn() << "Failed to set NUMA memory"
" policy to MPOL_INTERLEAVE: "
Expand Down Expand Up @@ -1509,10 +1511,11 @@ buf_chunk_init(

#if defined(HAVE_LIBNUMA) && defined(WITH_NUMA)
if (srv_numa_interleave) {
struct bitmask *numa_mems_allowed = numa_get_mems_allowed();
int st = mbind(chunk->mem, chunk->mem_size(),
MPOL_INTERLEAVE,
numa_all_nodes_ptr->maskp,
numa_all_nodes_ptr->size,
numa_mems_allowed->maskp,
numa_mems_allowed->size,
MPOL_MF_MOVE);
if (st != 0) {
ib::warn() << "Failed to set NUMA memory policy of"
Expand Down