From: David Hildenbrand <david@redhat.com>
To: Kefeng Wang <wangkefeng.wang@huawei.com>, linux-mm@kvack.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@suse.com>, Vlastimil Babka <vbabka@suse.cz>
Subject: Re: [PATCH] mm, page_alloc: avoid page_to_pfn() in move_freepages()
Date: Wed, 27 Nov 2019 18:06:47 +0100 [thread overview]
Message-ID: <83b414d8-fa54-b384-b6fd-11963870ef05@redhat.com> (raw)
In-Reply-To: <20191127111830.87068-1-wangkefeng.wang@huawei.com>
> - start_pfn = page_to_pfn(page);
> - start_pfn = start_pfn & ~(pageblock_nr_pages-1);
> - start_page = pfn_to_page(start_pfn);
> - end_page = start_page + pageblock_nr_pages - 1;
> + pfn = page_to_pfn(page);
> + start_pfn = pfn & ~(pageblock_nr_pages-1);
please add spaces around the "-" ("pageblock_nr_pages - 1")
> end_pfn = start_pfn + pageblock_nr_pages - 1;
>
> /* Do not cross zone boundaries */
> if (!zone_spans_pfn(zone, start_pfn))
> - start_page = page;
> + start_pfn = pfn;
> if (!zone_spans_pfn(zone, end_pfn))
> return 0;
>
> - return move_freepages(zone, start_page, end_page, migratetype,
> + return move_freepages(zone, start_pfn, end_pfn, migratetype,
> num_movable);
> }
>
>
In general, this looks good to me (also as a pure cleanup). But there is
still a discussion going on if this is a bugfix or not, so I hold back
and rb/acks - especially as it might need a patch description update ;)
--
Thanks,
David / dhildenb
next prev parent reply other threads:[~2019-11-27 17:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-27 10:28 [RFC PATCH] mm, page_alloc: avoid page_to_pfn() in move_freepages() Kefeng Wang
2019-11-27 10:47 ` David Hildenbrand
2019-11-27 11:18 ` [PATCH] " Kefeng Wang
2019-11-27 17:06 ` David Hildenbrand [this message]
2019-11-27 11:21 ` [RFC PATCH] " Kefeng Wang
2019-11-27 11:47 ` Michal Hocko
2019-11-27 13:13 ` Kefeng Wang
2019-11-27 14:13 ` Michal Hocko
2019-11-27 14:28 ` Qian Cai
2019-11-27 14:39 ` Kefeng Wang
2019-11-27 15:09 ` Qian Cai
2019-11-27 17:15 ` David Hildenbrand
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=83b414d8-fa54-b384-b6fd-11963870ef05@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=vbabka@suse.cz \
--cc=wangkefeng.wang@huawei.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).