NeoPZ
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 
43  public:
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
void migrate_to_local(char *start, uint64_t sz_in_bytes)
~TPZPageMigrationManager()
Destroy hwloc topology when the lib is enabled.
TPZPageMigrationManager()
Initialize hwloc tolopology when the lib is enabled.