From: David Hildenbrand <david@redhat.com>
To: Mike Rapoport <rppt@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Mike Rapoport <rppt@linux.ibm.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH 2/2] mm: memory_hotplug: cleanup after removal of pfn_valid_within()
Date: Tue, 13 Jul 2021 11:54:08 +0200 [thread overview]
Message-ID: <96c061b4-c9cf-f481-5319-f26464435eb6@redhat.com> (raw)
In-Reply-To: <20210713080035.7464-3-rppt@kernel.org>
On 13.07.21 10:00, Mike Rapoport wrote:
> From: Mike Rapoport <rppt@linux.ibm.com>
>
> When test_pages_in_a_zone() used pfn_valid_within() is has some logic
> surrounding pfn_valid_within() checks.
>
> Since pfn_valid_within() is gone, this logic can be removed.
>
> Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
> ---
> mm/memory_hotplug.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
> index 1085bd03ecba..ca09045bb587 100644
> --- a/mm/memory_hotplug.c
> +++ b/mm/memory_hotplug.c
> @@ -1298,7 +1298,7 @@ struct zone *test_pages_in_a_zone(unsigned long start_pfn,
> unsigned long pfn, sec_end_pfn;
> struct zone *zone = NULL;
> struct page *page;
> - int i;
> +
> for (pfn = start_pfn, sec_end_pfn = SECTION_ALIGN_UP(start_pfn + 1);
> pfn < end_pfn;
> pfn = sec_end_pfn, sec_end_pfn += PAGES_PER_SECTION) {
> @@ -1307,13 +1307,10 @@ struct zone *test_pages_in_a_zone(unsigned long start_pfn,
> continue;
> for (; pfn < sec_end_pfn && pfn < end_pfn;
> pfn += MAX_ORDER_NR_PAGES) {
> - i = 0;
> - if (i == MAX_ORDER_NR_PAGES || pfn + i >= end_pfn)
> - continue;
> /* Check if we got outside of the zone */
> - if (zone && !zone_spans_pfn(zone, pfn + i))
> + if (zone && !zone_spans_pfn(zone, pfn))
> return NULL;
> - page = pfn_to_page(pfn + i);
> + page = pfn_to_page(pfn);
> if (zone && page_zone(page) != zone)
> return NULL;
> zone = page_zone(page);
>
I'd just squash that into the previous commit.
Reviewed-by: David Hildenbrand <david@redhat.com>
--
Thanks,
David / dhildenb
prev parent reply other threads:[~2021-07-13 9:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-13 8:00 [PATCH 0/2] mm: remove pfn_valid_within() and CONFIG_HOLES_IN_ZONE Mike Rapoport
2021-07-13 8:00 ` [PATCH 1/2] " Mike Rapoport
2021-07-13 9:51 ` David Hildenbrand
2021-07-13 10:22 ` Mike Rapoport
2021-07-13 10:24 ` David Hildenbrand
2021-07-13 20:02 ` Zi Yan
2021-07-13 8:00 ` [PATCH 2/2] mm: memory_hotplug: cleanup after removal of pfn_valid_within() Mike Rapoport
2021-07-13 9:54 ` David Hildenbrand [this message]
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=96c061b4-c9cf-f481-5319-f26464435eb6@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rafael@kernel.org \
--cc=rppt@kernel.org \
--cc=rppt@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