linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Anshuman Khandual <anshuman.khandual@arm.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: Zi Yan <ziy@nvidia.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	mike.kravetz@oracle.com, osalvador@suse.de,
	akpm@linux-foundation.org
Subject: Re: [PATCH] mm/isolation: Remove redundant pfn_valid_within() in __first_valid_page()
Date: Thu, 21 Mar 2019 13:43:40 +0530	[thread overview]
Message-ID: <8a6b3968-a315-07ce-0491-2a5acdd49ab4@arm.com> (raw)
In-Reply-To: <20190321080702.GG8696@dhcp22.suse.cz>



On 03/21/2019 01:37 PM, Michal Hocko wrote:
> On Thu 21-03-19 11:03:18, Anshuman Khandual wrote:
>>
>>
>> On 03/21/2019 10:31 AM, Zi Yan wrote:
>>> On 20 Mar 2019, at 21:13, Anshuman Khandual wrote:
>>>
>>>> pfn_valid_within() calls pfn_valid() when CONFIG_HOLES_IN_ZONE making it
>>>> redundant for both definitions (w/wo CONFIG_MEMORY_HOTPLUG) of the helper
>>>> pfn_to_online_page() which either calls pfn_valid() or pfn_valid_within().
>>>> pfn_valid_within() being 1 when !CONFIG_HOLES_IN_ZONE is irrelevant either
>>>> way. This does not change functionality.
>>>>
>>>> Fixes: 2ce13640b3f4 ("mm: __first_valid_page skip over offline pages")
>>>
>>> I would not say this patch fixes the commit 2ce13640b3f4 from 2017,
>>> because the pfn_valid_within() in pfn_to_online_page() was introduced by
>>> a recent commit b13bc35193d9e last month. :)
>>
>> Right, will update the tag with this commit.
> 
> The patch is correct but I wouldn't bother to add Fixes tag at all. The
> current code is obviously not incorrect. Do you see any actual

Sure.

> performance issue?
> 

No. Just from code inspection. pfn_valid() is anyways expensive on arm64
because of the memblock search so why to make it redundant as well.


  reply	other threads:[~2019-03-21  8:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-21  4:13 [PATCH] mm/isolation: Remove redundant pfn_valid_within() in __first_valid_page() Anshuman Khandual
2019-03-21  5:01 ` Zi Yan
2019-03-21  5:33   ` Anshuman Khandual
2019-03-21  8:07     ` Michal Hocko
2019-03-21  8:13       ` Anshuman Khandual [this message]
2019-03-21  9:42 ` Oscar Salvador
2019-03-21 10:03   ` Michal Hocko
2019-03-22  9:23 ` Michal Hocko

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=8a6b3968-a315-07ce-0491-2a5acdd49ab4@arm.com \
    --to=anshuman.khandual@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=mike.kravetz@oracle.com \
    --cc=osalvador@suse.de \
    --cc=ziy@nvidia.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).