Beispiel #1
0
    def __fill_alien_caches(self, node: gdb.Value, nid_src: int) -> None:
        alien_cache = node["alien"]

        # TODO check that this only happens for single-node systems?
        if int(alien_cache) == 0:
            return

        for nid in for_each_nid():
            array = alien_cache[nid].dereference()

            # TODO: limit should prevent this?
            if array.address == 0:
                continue

            if self.alien_cache_type_exists:
                array = array["ac"]

            # A node cannot have alien cache on the same node, but some
            # kernels (xen) seem to have a non-null pointer there anyway
            if nid_src == nid:
                continue

            self.__fill_array_cache(array, AC_ALIEN, nid_src, nid)
 def test_for_each_nid(self):
     count = 0
     for nid in numa_node.for_each_nid():
         self.assertTrue(type(nid) is int)
         count += 1
     self.assertTrue(count > 0)
Beispiel #3
0
 def __get_nodelists(self) -> Iterable[Tuple[int, gdb.Value]]:
     for nid in for_each_nid():
         node = self.__get_nodelist(nid)
         if int(node) == 0:
             continue
         yield (nid, node.dereference())
Beispiel #4
0
 def __get_nodelists(self):
     for nid in for_each_nid():
         node = self.__get_nodelist(nid)
         if long(node) == 0L:
             continue
         yield (nid, node.dereference())