On Fri, Jun 07, 2024 at 10:37:10AM +0200, David Hildenbrand wrote: > Can we get rid of the highmem ifdef in adjust_managed_page_count()? > Likely yes: we don't have that many totalhigh_pages() users, and they > all don't seem to be very performance critical. > > So let's implement totalhigh_pages() like nr_free_highpages(), > collecting information from all zones. This is now similar to what we do > in si_meminfo_node() to collect the per-node highmem page count. > > In the common case (single node, 3-4 zones), we really shouldn't care. > We could optimize a bit further (only walk ZONE_HIGHMEM and ZONE_MOVABLE > if required), but there doesn't seem a real need for that. > > Signed-off-by: David Hildenbrand <david@xxxxxxxxxx> Reviewed-by: Oscar Salvador <osalvador@xxxxxxx> -- Oscar Salvador SUSE Labs