summaryrefslogtreecommitdiff
path: root/nest/rt-table.c
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2021-11-30 23:57:14 +0100
committerMaria Matejka <mq@ucw.cz>2021-12-01 13:00:54 +0100
commitbb63e99d7877023667edaf26495dd657ec2fd57b (patch)
tree3ae919a00541c27c8f661addb56c6d4ef681d361 /nest/rt-table.c
parent385b3ea3956aefc2868cdd838fc0a90f1d8a7857 (diff)
Page allocator moved from pools to IO loops.
The resource pool system is highly hierarchical and keeping spare pages in pools leads to unnecessarily complex memory management. Loops have a flat hiearchy, at least for now, and it is therefore much easier to keep care of pages, especially in cases of excessive virtual memory fragmentation.
Diffstat (limited to 'nest/rt-table.c')
-rw-r--r--nest/rt-table.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c
index cd0d6291..ada54396 100644
--- a/nest/rt-table.c
+++ b/nest/rt-table.c
@@ -1057,7 +1057,7 @@ rte_announce(rtable_private *tab, net *net, struct rte_storage *new, struct rte_
if (!rpeb)
{
- rpeb = alloc_page(tab->rp);
+ rpeb = alloc_page();
*rpeb = (struct rt_export_block) {};
add_tail(&tab->pending_exports, &rpeb->n);
}
@@ -2157,7 +2157,7 @@ rt_free(resource *_r)
static void
rt_res_dump(resource *_r)
{
- RT_LOCKED((rtable *) _r, r)
+ rtable_private *r = RT_PRIV((rtable *) _r);
debug("name \"%s\", addr_type=%s, rt_count=%u, use_count=%d\n",
r->name, net_label[r->addr_type], r->rt_count, r->use_count);
}
@@ -2484,7 +2484,7 @@ rt_export_cleanup(void *data)
memset(reb, 0xbe, page_size);
#endif
- free_page(tab->rp, reb);
+ free_page(reb);
if (EMPTY_LIST(tab->pending_exports))
{