From: David Hildenbrand <david@redhat.com>
To: Vaibhav Jain <vaibhav@linux.ibm.com>, linux-kernel@vger.kernel.org
Cc: "Aneesh Kumar K . V" <aneesh.kumar@linux.ibm.com>,
Andrew Morton <akpm@linux-foundation.org>,
Dan Williams <dan.j.williams@intel.com>,
Miaohe Lin <linmiaohe@huawei.com>,
Muchun Song <songmuchun@bytedance.com>
Subject: Re: [PATCH] resource: re-factor page_is_ram()
Date: Fri, 10 Jun 2022 12:23:50 +0200 [thread overview]
Message-ID: <05623846-03c7-89f1-e1dd-0ee23723c7e9@redhat.com> (raw)
In-Reply-To: <20220601163243.3806231-1-vaibhav@linux.ibm.com>
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
next prev parent reply other threads:[~2022-06-10 10:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-01 16:32 [PATCH] resource: re-factor page_is_ram() Vaibhav Jain
2022-06-10 10:23 ` David Hildenbrand [this message]
2022-06-16 6:45 ` Vaibhav Jain
2022-07-18 10:42 ` David Hildenbrand
2022-07-18 10:48 ` David Hildenbrand
2022-07-18 18:00 ` Dan Williams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=05623846-03c7-89f1-e1dd-0ee23723c7e9@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.ibm.com \
--cc=dan.j.williams@intel.com \
--cc=linmiaohe@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=songmuchun@bytedance.com \
--cc=vaibhav@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).