From: Michal Hocko <mhocko@suse.com>
To: Oscar Salvador <osalvador@techadventures.net>
Cc: linux-mm@kvack.org, vbabka@suse.cz, akpm@linux-foundation.org
Subject: Re: [PATCH v2] mm/page_owner: Clean up init_pages_in_zone()
Date: Wed, 10 Jan 2018 13:10:49 +0100 [thread overview]
Message-ID: <20180110121049.GS1732@dhcp22.suse.cz> (raw)
In-Reply-To: <20180110084355.GA22822@techadventures.net>
On Wed 10-01-18 09:43:55, Oscar Salvador wrote:
> This patch removes two redundant assignments in init_pages_in_zone function.
>
> Signed-off-by: Oscar Salvador <osalvador@techadventures.net>
Acked-by: Michal Hocko <mhocko@suse.com>
> ---
> mm/page_owner.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/mm/page_owner.c b/mm/page_owner.c
> index 69f83fc763bb..b361781e5ab6 100644
> --- a/mm/page_owner.c
> +++ b/mm/page_owner.c
> @@ -528,14 +528,11 @@ read_page_owner(struct file *file, char __user *buf, size_t count, loff_t *ppos)
>
> static void init_pages_in_zone(pg_data_t *pgdat, struct zone *zone)
> {
> - struct page *page;
> - struct page_ext *page_ext;
> unsigned long pfn = zone->zone_start_pfn, block_end_pfn;
> unsigned long end_pfn = pfn + zone->spanned_pages;
> unsigned long count = 0;
>
> /* Scan block by block. First and last block may be incomplete */
> - pfn = zone->zone_start_pfn;
>
> /*
> * Walk the zone in pageblock_nr_pages steps. If a page block spans
> @@ -551,9 +548,9 @@ static void init_pages_in_zone(pg_data_t *pgdat, struct zone *zone)
> block_end_pfn = ALIGN(pfn + 1, pageblock_nr_pages);
> block_end_pfn = min(block_end_pfn, end_pfn);
>
> - page = pfn_to_page(pfn);
> -
> for (; pfn < block_end_pfn; pfn++) {
> + struct page *page;
> + struct page_ext *page_ext;
> if (!pfn_valid_within(pfn))
> continue;
>
> --
> 2.13.5
>
--
Michal Hocko
SUSE Labs
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2018-01-10 12:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-10 8:43 [PATCH v2] mm/page_owner: Clean up init_pages_in_zone() Oscar Salvador
2018-01-10 12:10 ` Michal Hocko [this message]
2018-01-17 10:02 ` Vlastimil Babka
2018-01-17 12:14 ` Oscar Salvador
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=20180110121049.GS1732@dhcp22.suse.cz \
--to=mhocko@suse.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=osalvador@techadventures.net \
--cc=vbabka@suse.cz \
/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).