[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <05623846-03c7-89f1-e1dd-0ee23723c7e9@redhat.com>
Date: Fri, 10 Jun 2022 12:23:50 +0200
From: David Hildenbrand <david@...hat.com>
To: Vaibhav Jain <vaibhav@...ux.ibm.com>, linux-kernel@...r.kernel.org
Cc: "Aneesh Kumar K . V" <aneesh.kumar@...ux.ibm.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Dan Williams <dan.j.williams@...el.com>,
Miaohe Lin <linmiaohe@...wei.com>,
Muchun Song <songmuchun@...edance.com>
Subject: Re: [PATCH] resource: re-factor page_is_ram()
On 01.06.22 18:32, Vaibhav Jain wrote:
> Presently page_is_ram() relies on walk_system_ram_range() that performs a walk
> on kernel iomem resources hierarchy with a dummy callback __is_ram(). Before
> calling find_next_iomem_res(), walk_system_ram_range() does some book-keeping
> which can be avoided for page_is_ram() use-case.
>
> Hence this patch proposes to update page_is_ram() to directly call
> find_next_iomem_res() with minimal book-keeping needed.
I consider the code harder to get compared to just reusing the
more-generic and expressive walk_system_ram_range().
It somehow feels like we're duplicating the code here just to optimize
out a handful of instructions.
If it doesn't make the code easier to read (at least for me), why do we
care?
--
Thanks,
David / dhildenb
Powered by blists - more mailing lists