numa.c 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643
  1. /*
  2. * NUMA parameter parsing routines
  3. *
  4. * Copyright (c) 2014 Fujitsu Ltd.
  5. *
  6. * Permission is hereby granted, free of charge, to any person obtaining a copy
  7. * of this software and associated documentation files (the "Software"), to deal
  8. * in the Software without restriction, including without limitation the rights
  9. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  10. * copies of the Software, and to permit persons to whom the Software is
  11. * furnished to do so, subject to the following conditions:
  12. *
  13. * The above copyright notice and this permission notice shall be included in
  14. * all copies or substantial portions of the Software.
  15. *
  16. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  17. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  18. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  19. * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  20. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  21. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  22. * THE SOFTWARE.
  23. */
  24. #include "qemu/osdep.h"
  25. #include "sysemu/numa.h"
  26. #include "exec/cpu-common.h"
  27. #include "exec/ramlist.h"
  28. #include "qemu/bitmap.h"
  29. #include "qom/cpu.h"
  30. #include "qemu/error-report.h"
  31. #include "qapi/error.h"
  32. #include "qapi/opts-visitor.h"
  33. #include "qapi/qapi-commands-misc.h"
  34. #include "qapi/qapi-visit-misc.h"
  35. #include "hw/boards.h"
  36. #include "sysemu/hostmem.h"
  37. #include "hw/mem/pc-dimm.h"
  38. #include "qemu/option.h"
  39. #include "qemu/config-file.h"
  40. #include "qemu/cutils.h"
  41. QemuOptsList qemu_numa_opts = {
  42. .name = "numa",
  43. .implied_opt_name = "type",
  44. .head = QTAILQ_HEAD_INITIALIZER(qemu_numa_opts.head),
  45. .desc = { { 0 } } /* validated with OptsVisitor */
  46. };
  47. static int have_memdevs = -1;
  48. static int max_numa_nodeid; /* Highest specified NUMA node ID, plus one.
  49. * For all nodes, nodeid < max_numa_nodeid
  50. */
  51. int nb_numa_nodes;
  52. bool have_numa_distance;
  53. NodeInfo numa_info[MAX_NODES];
  54. static void parse_numa_node(MachineState *ms, NumaNodeOptions *node,
  55. Error **errp)
  56. {
  57. uint16_t nodenr;
  58. uint16List *cpus = NULL;
  59. MachineClass *mc = MACHINE_GET_CLASS(ms);
  60. if (node->has_nodeid) {
  61. nodenr = node->nodeid;
  62. } else {
  63. nodenr = nb_numa_nodes;
  64. }
  65. if (nodenr >= MAX_NODES) {
  66. error_setg(errp, "Max number of NUMA nodes reached: %"
  67. PRIu16 "", nodenr);
  68. return;
  69. }
  70. if (numa_info[nodenr].present) {
  71. error_setg(errp, "Duplicate NUMA nodeid: %" PRIu16, nodenr);
  72. return;
  73. }
  74. if (!mc->cpu_index_to_instance_props || !mc->get_default_cpu_node_id) {
  75. error_report("NUMA is not supported by this machine-type");
  76. exit(1);
  77. }
  78. for (cpus = node->cpus; cpus; cpus = cpus->next) {
  79. CpuInstanceProperties props;
  80. if (cpus->value >= max_cpus) {
  81. error_setg(errp,
  82. "CPU index (%" PRIu16 ")"
  83. " should be smaller than maxcpus (%d)",
  84. cpus->value, max_cpus);
  85. return;
  86. }
  87. props = mc->cpu_index_to_instance_props(ms, cpus->value);
  88. props.node_id = nodenr;
  89. props.has_node_id = true;
  90. machine_set_cpu_numa_node(ms, &props, &error_fatal);
  91. }
  92. if (node->has_mem && node->has_memdev) {
  93. error_setg(errp, "cannot specify both mem= and memdev=");
  94. return;
  95. }
  96. if (have_memdevs == -1) {
  97. have_memdevs = node->has_memdev;
  98. }
  99. if (node->has_memdev != have_memdevs) {
  100. error_setg(errp, "memdev option must be specified for either "
  101. "all or no nodes");
  102. return;
  103. }
  104. if (node->has_mem) {
  105. numa_info[nodenr].node_mem = node->mem;
  106. }
  107. if (node->has_memdev) {
  108. Object *o;
  109. o = object_resolve_path_type(node->memdev, TYPE_MEMORY_BACKEND, NULL);
  110. if (!o) {
  111. error_setg(errp, "memdev=%s is ambiguous", node->memdev);
  112. return;
  113. }
  114. object_ref(o);
  115. numa_info[nodenr].node_mem = object_property_get_uint(o, "size", NULL);
  116. numa_info[nodenr].node_memdev = MEMORY_BACKEND(o);
  117. }
  118. numa_info[nodenr].present = true;
  119. max_numa_nodeid = MAX(max_numa_nodeid, nodenr + 1);
  120. nb_numa_nodes++;
  121. }
  122. static void parse_numa_distance(NumaDistOptions *dist, Error **errp)
  123. {
  124. uint16_t src = dist->src;
  125. uint16_t dst = dist->dst;
  126. uint8_t val = dist->val;
  127. if (src >= MAX_NODES || dst >= MAX_NODES) {
  128. error_setg(errp,
  129. "Invalid node %d, max possible could be %d",
  130. MAX(src, dst), MAX_NODES);
  131. return;
  132. }
  133. if (!numa_info[src].present || !numa_info[dst].present) {
  134. error_setg(errp, "Source/Destination NUMA node is missing. "
  135. "Please use '-numa node' option to declare it first.");
  136. return;
  137. }
  138. if (val < NUMA_DISTANCE_MIN) {
  139. error_setg(errp, "NUMA distance (%" PRIu8 ") is invalid, "
  140. "it shouldn't be less than %d.",
  141. val, NUMA_DISTANCE_MIN);
  142. return;
  143. }
  144. if (src == dst && val != NUMA_DISTANCE_MIN) {
  145. error_setg(errp, "Local distance of node %d should be %d.",
  146. src, NUMA_DISTANCE_MIN);
  147. return;
  148. }
  149. numa_info[src].distance[dst] = val;
  150. have_numa_distance = true;
  151. }
  152. static int parse_numa(void *opaque, QemuOpts *opts, Error **errp)
  153. {
  154. NumaOptions *object = NULL;
  155. MachineState *ms = opaque;
  156. Error *err = NULL;
  157. {
  158. Visitor *v = opts_visitor_new(opts);
  159. visit_type_NumaOptions(v, NULL, &object, &err);
  160. visit_free(v);
  161. }
  162. if (err) {
  163. goto end;
  164. }
  165. /* Fix up legacy suffix-less format */
  166. if ((object->type == NUMA_OPTIONS_TYPE_NODE) && object->u.node.has_mem) {
  167. const char *mem_str = qemu_opt_get(opts, "mem");
  168. qemu_strtosz_MiB(mem_str, NULL, &object->u.node.mem);
  169. }
  170. switch (object->type) {
  171. case NUMA_OPTIONS_TYPE_NODE:
  172. parse_numa_node(ms, &object->u.node, &err);
  173. if (err) {
  174. goto end;
  175. }
  176. break;
  177. case NUMA_OPTIONS_TYPE_DIST:
  178. parse_numa_distance(&object->u.dist, &err);
  179. if (err) {
  180. goto end;
  181. }
  182. break;
  183. case NUMA_OPTIONS_TYPE_CPU:
  184. if (!object->u.cpu.has_node_id) {
  185. error_setg(&err, "Missing mandatory node-id property");
  186. goto end;
  187. }
  188. if (!numa_info[object->u.cpu.node_id].present) {
  189. error_setg(&err, "Invalid node-id=%" PRId64 ", NUMA node must be "
  190. "defined with -numa node,nodeid=ID before it's used with "
  191. "-numa cpu,node-id=ID", object->u.cpu.node_id);
  192. goto end;
  193. }
  194. machine_set_cpu_numa_node(ms, qapi_NumaCpuOptions_base(&object->u.cpu),
  195. &err);
  196. break;
  197. default:
  198. abort();
  199. }
  200. end:
  201. qapi_free_NumaOptions(object);
  202. if (err) {
  203. error_report_err(err);
  204. return -1;
  205. }
  206. return 0;
  207. }
  208. /* If all node pair distances are symmetric, then only distances
  209. * in one direction are enough. If there is even one asymmetric
  210. * pair, though, then all distances must be provided. The
  211. * distance from a node to itself is always NUMA_DISTANCE_MIN,
  212. * so providing it is never necessary.
  213. */
  214. static void validate_numa_distance(void)
  215. {
  216. int src, dst;
  217. bool is_asymmetrical = false;
  218. for (src = 0; src < nb_numa_nodes; src++) {
  219. for (dst = src; dst < nb_numa_nodes; dst++) {
  220. if (numa_info[src].distance[dst] == 0 &&
  221. numa_info[dst].distance[src] == 0) {
  222. if (src != dst) {
  223. error_report("The distance between node %d and %d is "
  224. "missing, at least one distance value "
  225. "between each nodes should be provided.",
  226. src, dst);
  227. exit(EXIT_FAILURE);
  228. }
  229. }
  230. if (numa_info[src].distance[dst] != 0 &&
  231. numa_info[dst].distance[src] != 0 &&
  232. numa_info[src].distance[dst] !=
  233. numa_info[dst].distance[src]) {
  234. is_asymmetrical = true;
  235. }
  236. }
  237. }
  238. if (is_asymmetrical) {
  239. for (src = 0; src < nb_numa_nodes; src++) {
  240. for (dst = 0; dst < nb_numa_nodes; dst++) {
  241. if (src != dst && numa_info[src].distance[dst] == 0) {
  242. error_report("At least one asymmetrical pair of "
  243. "distances is given, please provide distances "
  244. "for both directions of all node pairs.");
  245. exit(EXIT_FAILURE);
  246. }
  247. }
  248. }
  249. }
  250. }
  251. static void complete_init_numa_distance(void)
  252. {
  253. int src, dst;
  254. /* Fixup NUMA distance by symmetric policy because if it is an
  255. * asymmetric distance table, it should be a complete table and
  256. * there would not be any missing distance except local node, which
  257. * is verified by validate_numa_distance above.
  258. */
  259. for (src = 0; src < nb_numa_nodes; src++) {
  260. for (dst = 0; dst < nb_numa_nodes; dst++) {
  261. if (numa_info[src].distance[dst] == 0) {
  262. if (src == dst) {
  263. numa_info[src].distance[dst] = NUMA_DISTANCE_MIN;
  264. } else {
  265. numa_info[src].distance[dst] = numa_info[dst].distance[src];
  266. }
  267. }
  268. }
  269. }
  270. }
  271. void numa_legacy_auto_assign_ram(MachineClass *mc, NodeInfo *nodes,
  272. int nb_nodes, ram_addr_t size)
  273. {
  274. int i;
  275. uint64_t usedmem = 0;
  276. /* Align each node according to the alignment
  277. * requirements of the machine class
  278. */
  279. for (i = 0; i < nb_nodes - 1; i++) {
  280. nodes[i].node_mem = (size / nb_nodes) &
  281. ~((1 << mc->numa_mem_align_shift) - 1);
  282. usedmem += nodes[i].node_mem;
  283. }
  284. nodes[i].node_mem = size - usedmem;
  285. }
  286. void numa_default_auto_assign_ram(MachineClass *mc, NodeInfo *nodes,
  287. int nb_nodes, ram_addr_t size)
  288. {
  289. int i;
  290. uint64_t usedmem = 0, node_mem;
  291. uint64_t granularity = size / nb_nodes;
  292. uint64_t propagate = 0;
  293. for (i = 0; i < nb_nodes - 1; i++) {
  294. node_mem = (granularity + propagate) &
  295. ~((1 << mc->numa_mem_align_shift) - 1);
  296. propagate = granularity + propagate - node_mem;
  297. nodes[i].node_mem = node_mem;
  298. usedmem += node_mem;
  299. }
  300. nodes[i].node_mem = size - usedmem;
  301. }
  302. void parse_numa_opts(MachineState *ms)
  303. {
  304. int i;
  305. MachineClass *mc = MACHINE_GET_CLASS(ms);
  306. if (qemu_opts_foreach(qemu_find_opts("numa"), parse_numa, ms, NULL)) {
  307. exit(1);
  308. }
  309. /*
  310. * If memory hotplug is enabled (slots > 0) but without '-numa'
  311. * options explicitly on CLI, guestes will break.
  312. *
  313. * Windows: won't enable memory hotplug without SRAT table at all
  314. *
  315. * Linux: if QEMU is started with initial memory all below 4Gb
  316. * and no SRAT table present, guest kernel will use nommu DMA ops,
  317. * which breaks 32bit hw drivers when memory is hotplugged and
  318. * guest tries to use it with that drivers.
  319. *
  320. * Enable NUMA implicitly by adding a new NUMA node automatically.
  321. */
  322. if (ms->ram_slots > 0 && nb_numa_nodes == 0 &&
  323. mc->auto_enable_numa_with_memhp) {
  324. NumaNodeOptions node = { };
  325. parse_numa_node(ms, &node, NULL);
  326. }
  327. assert(max_numa_nodeid <= MAX_NODES);
  328. /* No support for sparse NUMA node IDs yet: */
  329. for (i = max_numa_nodeid - 1; i >= 0; i--) {
  330. /* Report large node IDs first, to make mistakes easier to spot */
  331. if (!numa_info[i].present) {
  332. error_report("numa: Node ID missing: %d", i);
  333. exit(1);
  334. }
  335. }
  336. /* This must be always true if all nodes are present: */
  337. assert(nb_numa_nodes == max_numa_nodeid);
  338. if (nb_numa_nodes > 0) {
  339. uint64_t numa_total;
  340. if (nb_numa_nodes > MAX_NODES) {
  341. nb_numa_nodes = MAX_NODES;
  342. }
  343. /* If no memory size is given for any node, assume the default case
  344. * and distribute the available memory equally across all nodes
  345. */
  346. for (i = 0; i < nb_numa_nodes; i++) {
  347. if (numa_info[i].node_mem != 0) {
  348. break;
  349. }
  350. }
  351. if (i == nb_numa_nodes) {
  352. assert(mc->numa_auto_assign_ram);
  353. mc->numa_auto_assign_ram(mc, numa_info, nb_numa_nodes, ram_size);
  354. }
  355. numa_total = 0;
  356. for (i = 0; i < nb_numa_nodes; i++) {
  357. numa_total += numa_info[i].node_mem;
  358. }
  359. if (numa_total != ram_size) {
  360. error_report("total memory for NUMA nodes (0x%" PRIx64 ")"
  361. " should equal RAM size (0x" RAM_ADDR_FMT ")",
  362. numa_total, ram_size);
  363. exit(1);
  364. }
  365. /* QEMU needs at least all unique node pair distances to build
  366. * the whole NUMA distance table. QEMU treats the distance table
  367. * as symmetric by default, i.e. distance A->B == distance B->A.
  368. * Thus, QEMU is able to complete the distance table
  369. * initialization even though only distance A->B is provided and
  370. * distance B->A is not. QEMU knows the distance of a node to
  371. * itself is always 10, so A->A distances may be omitted. When
  372. * the distances of two nodes of a pair differ, i.e. distance
  373. * A->B != distance B->A, then that means the distance table is
  374. * asymmetric. In this case, the distances for both directions
  375. * of all node pairs are required.
  376. */
  377. if (have_numa_distance) {
  378. /* Validate enough NUMA distance information was provided. */
  379. validate_numa_distance();
  380. /* Validation succeeded, now fill in any missing distances. */
  381. complete_init_numa_distance();
  382. }
  383. }
  384. }
  385. void numa_cpu_pre_plug(const CPUArchId *slot, DeviceState *dev, Error **errp)
  386. {
  387. int node_id = object_property_get_int(OBJECT(dev), "node-id", &error_abort);
  388. if (node_id == CPU_UNSET_NUMA_NODE_ID) {
  389. /* due to bug in libvirt, it doesn't pass node-id from props on
  390. * device_add as expected, so we have to fix it up here */
  391. if (slot->props.has_node_id) {
  392. object_property_set_int(OBJECT(dev), slot->props.node_id,
  393. "node-id", errp);
  394. }
  395. } else if (node_id != slot->props.node_id) {
  396. error_setg(errp, "node-id=%d must match numa node specified "
  397. "with -numa option", node_id);
  398. }
  399. }
  400. static void allocate_system_memory_nonnuma(MemoryRegion *mr, Object *owner,
  401. const char *name,
  402. uint64_t ram_size)
  403. {
  404. if (mem_path) {
  405. #ifdef __linux__
  406. Error *err = NULL;
  407. memory_region_init_ram_from_file(mr, owner, name, ram_size, 0, false,
  408. mem_path, &err);
  409. if (err) {
  410. error_report_err(err);
  411. if (mem_prealloc) {
  412. exit(1);
  413. }
  414. error_report("falling back to regular RAM allocation.");
  415. /* Legacy behavior: if allocation failed, fall back to
  416. * regular RAM allocation.
  417. */
  418. memory_region_init_ram_nomigrate(mr, owner, name, ram_size, &error_fatal);
  419. }
  420. #else
  421. fprintf(stderr, "-mem-path not supported on this host\n");
  422. exit(1);
  423. #endif
  424. } else {
  425. memory_region_init_ram_nomigrate(mr, owner, name, ram_size, &error_fatal);
  426. }
  427. vmstate_register_ram_global(mr);
  428. }
  429. void memory_region_allocate_system_memory(MemoryRegion *mr, Object *owner,
  430. const char *name,
  431. uint64_t ram_size)
  432. {
  433. uint64_t addr = 0;
  434. int i;
  435. if (nb_numa_nodes == 0 || !have_memdevs) {
  436. allocate_system_memory_nonnuma(mr, owner, name, ram_size);
  437. return;
  438. }
  439. memory_region_init(mr, owner, name, ram_size);
  440. for (i = 0; i < nb_numa_nodes; i++) {
  441. uint64_t size = numa_info[i].node_mem;
  442. HostMemoryBackend *backend = numa_info[i].node_memdev;
  443. if (!backend) {
  444. continue;
  445. }
  446. MemoryRegion *seg = host_memory_backend_get_memory(backend,
  447. &error_fatal);
  448. if (memory_region_is_mapped(seg)) {
  449. char *path = object_get_canonical_path_component(OBJECT(backend));
  450. error_report("memory backend %s is used multiple times. Each "
  451. "-numa option must use a different memdev value.",
  452. path);
  453. exit(1);
  454. }
  455. host_memory_backend_set_mapped(backend, true);
  456. memory_region_add_subregion(mr, addr, seg);
  457. vmstate_register_ram_global(seg);
  458. addr += size;
  459. }
  460. }
  461. static void numa_stat_memory_devices(NumaNodeMem node_mem[])
  462. {
  463. MemoryDeviceInfoList *info_list = qmp_pc_dimm_device_list();
  464. MemoryDeviceInfoList *info;
  465. PCDIMMDeviceInfo *pcdimm_info;
  466. for (info = info_list; info; info = info->next) {
  467. MemoryDeviceInfo *value = info->value;
  468. if (value) {
  469. switch (value->type) {
  470. case MEMORY_DEVICE_INFO_KIND_DIMM:
  471. pcdimm_info = value->u.dimm.data;
  472. break;
  473. case MEMORY_DEVICE_INFO_KIND_NVDIMM:
  474. pcdimm_info = value->u.nvdimm.data;
  475. break;
  476. default:
  477. pcdimm_info = NULL;
  478. break;
  479. }
  480. if (pcdimm_info) {
  481. node_mem[pcdimm_info->node].node_mem += pcdimm_info->size;
  482. if (pcdimm_info->hotpluggable && pcdimm_info->hotplugged) {
  483. node_mem[pcdimm_info->node].node_plugged_mem +=
  484. pcdimm_info->size;
  485. }
  486. }
  487. }
  488. }
  489. qapi_free_MemoryDeviceInfoList(info_list);
  490. }
  491. void query_numa_node_mem(NumaNodeMem node_mem[])
  492. {
  493. int i;
  494. if (nb_numa_nodes <= 0) {
  495. return;
  496. }
  497. numa_stat_memory_devices(node_mem);
  498. for (i = 0; i < nb_numa_nodes; i++) {
  499. node_mem[i].node_mem += numa_info[i].node_mem;
  500. }
  501. }
  502. static int query_memdev(Object *obj, void *opaque)
  503. {
  504. MemdevList **list = opaque;
  505. MemdevList *m = NULL;
  506. if (object_dynamic_cast(obj, TYPE_MEMORY_BACKEND)) {
  507. m = g_malloc0(sizeof(*m));
  508. m->value = g_malloc0(sizeof(*m->value));
  509. m->value->id = object_property_get_str(obj, "id", NULL);
  510. m->value->has_id = !!m->value->id;
  511. m->value->size = object_property_get_uint(obj, "size",
  512. &error_abort);
  513. m->value->merge = object_property_get_bool(obj, "merge",
  514. &error_abort);
  515. m->value->dump = object_property_get_bool(obj, "dump",
  516. &error_abort);
  517. m->value->prealloc = object_property_get_bool(obj,
  518. "prealloc",
  519. &error_abort);
  520. m->value->policy = object_property_get_enum(obj,
  521. "policy",
  522. "HostMemPolicy",
  523. &error_abort);
  524. object_property_get_uint16List(obj, "host-nodes",
  525. &m->value->host_nodes,
  526. &error_abort);
  527. m->next = *list;
  528. *list = m;
  529. }
  530. return 0;
  531. }
  532. MemdevList *qmp_query_memdev(Error **errp)
  533. {
  534. Object *obj = object_get_objects_root();
  535. MemdevList *list = NULL;
  536. object_child_foreach(obj, query_memdev, &list);
  537. return list;
  538. }
  539. void ram_block_notifier_add(RAMBlockNotifier *n)
  540. {
  541. QLIST_INSERT_HEAD(&ram_list.ramblock_notifiers, n, next);
  542. }
  543. void ram_block_notifier_remove(RAMBlockNotifier *n)
  544. {
  545. QLIST_REMOVE(n, next);
  546. }
  547. void ram_block_notify_add(void *host, size_t size)
  548. {
  549. RAMBlockNotifier *notifier;
  550. QLIST_FOREACH(notifier, &ram_list.ramblock_notifiers, next) {
  551. notifier->ram_block_added(notifier, host, size);
  552. }
  553. }
  554. void ram_block_notify_remove(void *host, size_t size)
  555. {
  556. RAMBlockNotifier *notifier;
  557. QLIST_FOREACH(notifier, &ram_list.ramblock_notifiers, next) {
  558. notifier->ram_block_removed(notifier, host, size);
  559. }
  560. }