[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZmZxrtGb4rDepBYv@localhost.localdomain>
Date: Mon, 10 Jun 2024 05:23:26 +0200
From: Oscar Salvador <osalvador@...e.de>
To: David Hildenbrand <david@...hat.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Andrew Morton <akpm@...ux-foundation.org>,
Wei Yang <richard.weiyang@...il.com>
Subject: Re: [PATCH v1 1/2] mm/highmem: reimplement totalhigh_pages() by
walking zones
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@...hat.com>
Reviewed-by: Oscar Salvador <osalvador@...e.de>
--
Oscar Salvador
SUSE Labs
Powered by blists - more mailing lists