[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v3 3/7] xen/page_alloc: Add and track per_node(avail_pages)
On 07.09.2025 18:15, Bernhard Kaindl wrote: > --- a/xen/common/page_alloc.c > +++ b/xen/common/page_alloc.c > @@ -486,6 +486,10 @@ static unsigned long node_need_scrub[MAX_NUMNODES]; > static unsigned long *avail[MAX_NUMNODES]; > static long total_avail_pages; > > +/* Per-NUMA-node counts of free pages */ > +DECLARE_PER_NODE(unsigned long, avail_pages); > +DEFINE_PER_NODE(unsigned long, avail_pages); Why both a declare and a define, but no static? A declare, if needed, would need to go into a header, I expect. Whereas if only this CU needs access, no declare should be needed, but static be added to the define. > @@ -1074,6 +1078,8 @@ static struct page_info *alloc_heap_pages( > > ASSERT(avail[node][zone] >= request); > avail[node][zone] -= request; > + ASSERT(per_node(avail_pages, node) >= request); > + per_node(avail_pages, node) -= request; Seeing the avail[] adjustment in context: What's the difference of that to per_node(avail_pages)? I don't think the (apparent?) redundancy is properly explained in the description. Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |