NeoPZ
Util
tpzpagemigrationmanager.h
Go to the documentation of this file.
1
/*******************************************************************************
2
* Copyright (C) 2014 by Edson Borin *
3
* edson@ic.unicamp.br *
4
* *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 2 of the License, or *
8
* (at your option) any later version. *
9
* *
10
* This program is distributed in the hope that it will be useful, *
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13
* GNU General Public License for more details. *
14
* *
15
* You should have received a copy of the GNU General Public License *
16
* along with this program; if not, write to the *
17
* Free Software Foundation, Inc., *
18
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19
******************************************************************************/
20
27
#ifndef TPZ_PAGEMIGRATIONMANAGER_H
28
#define TPZ_PAGEMIGRATIONMANAGER_H
29
30
#include <stdint.h>
31
32
#ifdef USING_HWLOC
33
#include <hwloc.h>
34
#endif
35
36
#ifdef USING_LIBNUMA
37
#include <numaif.h>
38
#endif
39
40
#include <stdio.h>
41
42
class
TPZPageMigrationManager
{
43
public
:
47
TPZPageMigrationManager
();
51
~TPZPageMigrationManager
();
52
#if defined (USING_HWLOC) || defined (USING_LIBNUMA)
53
59
void
MigrateToLocal(
char
* start, uint64_t size_in_bytes);
60
#endif
61
62
private
:
63
#ifdef USING_LIBNUMA
64
69
void
MigrateToLocalMovePages(
char
* start, uint64_t size_in_bytes);
75
void
MigrateToLocalMbind(
char
* start, uint64_t size_in_bytes);
76
#endif
77
#ifdef USING_HWLOC
78
83
void
MigrateToLocalHwloc(
char
* start, uint64_t size_in_bytes);
87
hwloc_topology_t hw_topo;
91
uint64_t HwCacheSize;
92
#endif
93
};
// class TPZPageMigrationManager
94
95
96
void
migrate_to_local
(
char
* start, uint64_t sz_in_bytes);
97
98
#endif
migrate_to_local
void migrate_to_local(char *start, uint64_t sz_in_bytes)
Definition:
tpzpagemigrationmanager.cpp:241
TPZPageMigrationManager::~TPZPageMigrationManager
~TPZPageMigrationManager()
Destroy hwloc topology when the lib is enabled.
Definition:
tpzpagemigrationmanager.cpp:62
TPZPageMigrationManager
Definition:
tpzpagemigrationmanager.h:42
TPZPageMigrationManager::TPZPageMigrationManager
TPZPageMigrationManager()
Initialize hwloc tolopology when the lib is enabled.
Definition:
tpzpagemigrationmanager.cpp:46
Generated on Sun Aug 16 2020 11:17:11 for NeoPZ by
1.8.13