All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Hansen <dave@linux.vnet.ibm.com>
To: Cody P Schafer <cody@linux.vnet.ibm.com>
Cc: Linux MM <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Catalin Marinas <catalin.marinas@arm.com>
Subject: Re: [PATCH 17/17] mm/compaction: use zone_end_pfn()
Date: Tue, 15 Jan 2013 17:39:32 -0800	[thread overview]
Message-ID: <50F604D4.407@linux.vnet.ibm.com> (raw)
In-Reply-To: <1358295894-24167-18-git-send-email-cody@linux.vnet.ibm.com>

On 01/15/2013 04:24 PM, Cody P Schafer wrote:
> diff --git a/mm/compaction.c b/mm/compaction.c
> index 1b52528..ea66be3 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -85,7 +85,7 @@ static inline bool isolation_suitable(struct compact_control *cc,
>  static void __reset_isolation_suitable(struct zone *zone)
>  {
>  	unsigned long start_pfn = zone->zone_start_pfn;
> -	unsigned long end_pfn = zone->zone_start_pfn + zone->spanned_pages;
> +	unsigned long end_pfn = zone_end_pfn(zone);
>  	unsigned long pfn;
> 
>  	zone->compact_cached_migrate_pfn = start_pfn;
> @@ -663,7 +663,7 @@ static void isolate_freepages(struct zone *zone,
>  	 */
>  	high_pfn = min(low_pfn, pfn);
> 
> -	z_end_pfn = zone->zone_start_pfn + zone->spanned_pages;
> +	z_end_pfn = zone_end_pfn(zone);
> 
>  	/*
>  	 * Isolate free pages until enough are available to migrate the
> @@ -920,7 +920,7 @@ static int compact_zone(struct zone *zone, struct compact_control *cc)
>  {
>  	int ret;
>  	unsigned long start_pfn = zone->zone_start_pfn;
> -	unsigned long end_pfn = zone->zone_start_pfn + zone->spanned_pages;
> +	unsigned long end_pfn = zone_end_pfn(zone);
> 
>  	ret = compaction_suitable(zone, cc->order);
>  	switch (ret) {

I do think theses are a _wee_ bit _too_ broken out.  In this case, it's
highly beneficial to just be able to look in the same email to make sure
that, "yeah, zone_end_pfn() is the same as the code that it replaces".
The fact that it was defined 15 patches ago makes it a bit harder to
review.  It's much nicer to review if there's _one_ patch that does the
"define this new function and do all of the replacements".

Anyway, the series looks good.  Feel free to add my:

Reviewed-by: Dave Hansen <dave@linux.vnet.ibm.com>

--
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>

WARNING: multiple messages have this Message-ID (diff)
From: Dave Hansen <dave@linux.vnet.ibm.com>
To: Cody P Schafer <cody@linux.vnet.ibm.com>
Cc: Linux MM <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Catalin Marinas <catalin.marinas@arm.com>
Subject: Re: [PATCH 17/17] mm/compaction: use zone_end_pfn()
Date: Tue, 15 Jan 2013 17:39:32 -0800	[thread overview]
Message-ID: <50F604D4.407@linux.vnet.ibm.com> (raw)
In-Reply-To: <1358295894-24167-18-git-send-email-cody@linux.vnet.ibm.com>

On 01/15/2013 04:24 PM, Cody P Schafer wrote:
> diff --git a/mm/compaction.c b/mm/compaction.c
> index 1b52528..ea66be3 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -85,7 +85,7 @@ static inline bool isolation_suitable(struct compact_control *cc,
>  static void __reset_isolation_suitable(struct zone *zone)
>  {
>  	unsigned long start_pfn = zone->zone_start_pfn;
> -	unsigned long end_pfn = zone->zone_start_pfn + zone->spanned_pages;
> +	unsigned long end_pfn = zone_end_pfn(zone);
>  	unsigned long pfn;
> 
>  	zone->compact_cached_migrate_pfn = start_pfn;
> @@ -663,7 +663,7 @@ static void isolate_freepages(struct zone *zone,
>  	 */
>  	high_pfn = min(low_pfn, pfn);
> 
> -	z_end_pfn = zone->zone_start_pfn + zone->spanned_pages;
> +	z_end_pfn = zone_end_pfn(zone);
> 
>  	/*
>  	 * Isolate free pages until enough are available to migrate the
> @@ -920,7 +920,7 @@ static int compact_zone(struct zone *zone, struct compact_control *cc)
>  {
>  	int ret;
>  	unsigned long start_pfn = zone->zone_start_pfn;
> -	unsigned long end_pfn = zone->zone_start_pfn + zone->spanned_pages;
> +	unsigned long end_pfn = zone_end_pfn(zone);
> 
>  	ret = compaction_suitable(zone, cc->order);
>  	switch (ret) {

I do think theses are a _wee_ bit _too_ broken out.  In this case, it's
highly beneficial to just be able to look in the same email to make sure
that, "yeah, zone_end_pfn() is the same as the code that it replaces".
The fact that it was defined 15 patches ago makes it a bit harder to
review.  It's much nicer to review if there's _one_ patch that does the
"define this new function and do all of the replacements".

Anyway, the series looks good.  Feel free to add my:

Reviewed-by: Dave Hansen <dave@linux.vnet.ibm.com>


  reply	other threads:[~2013-01-16  1:39 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-16  0:24 [PATCH 00/17] mm: zone & pgdat accessors plus some cleanup Cody P Schafer
2013-01-16  0:24 ` Cody P Schafer
2013-01-16  0:24 ` [PATCH 01/17] mm/compaction: rename var zone_end_pfn to avoid conflicts with new function Cody P Schafer
2013-01-16  0:24   ` Cody P Schafer
2013-01-16  1:08   ` Dave Hansen
2013-01-16  1:08     ` Dave Hansen
2013-01-16  0:24 ` [PATCH 02/17] mmzone: add various zone_*() helper functions Cody P Schafer
2013-01-16  0:24   ` Cody P Schafer
2013-01-16  1:19   ` Dave Hansen
2013-01-16  1:19     ` Dave Hansen
2013-01-16  1:20   ` Dave Hansen
2013-01-16  1:20     ` Dave Hansen
2013-01-16  0:24 ` [PATCH 03/17] mm/page_alloc: add a VM_BUG in __free_one_page() if the zone is uninitialized Cody P Schafer
2013-01-16  0:24   ` Cody P Schafer
2013-01-16  0:24 ` [PATCH 04/17] mm: add helper ensure_zone_is_initialized() Cody P Schafer
2013-01-16  0:24   ` Cody P Schafer
2013-01-16  0:24 ` [PATCH 05/17] mm/memory_hotplug: use ensure_zone_is_initialized() Cody P Schafer
2013-01-16  0:24   ` Cody P Schafer
2013-01-16  0:24 ` [PATCH 06/17] mmzone: add pgdat_{end_pfn,is_empty}() helpers & consolidate Cody P Schafer
2013-01-16  0:24   ` Cody P Schafer
2013-01-16  0:24 ` [PATCH 07/17] mm/page_alloc: use zone_spans_pfn() instead of open coding Cody P Schafer
2013-01-16  0:24   ` Cody P Schafer
2013-01-16  0:24 ` [PATCH 08/17] mm/page_alloc: use zone_spans_pfn() instead of open coded checks Cody P Schafer
2013-01-16  0:24   ` Cody P Schafer
2013-01-16  0:24 ` [PATCH 09/17] mm/page_alloc: use zone_end_pfn() & zone_spans_pfn() Cody P Schafer
2013-01-16  0:24   ` Cody P Schafer
2013-01-16  0:24 ` [PATCH 10/17] mm/vmstat: use zone_end_pfn() instead of opencoding Cody P Schafer
2013-01-16  0:24   ` Cody P Schafer
2013-01-16  0:24 ` [PATCH 11/17] mm/kmemleak: use node_{start,end}_pfn() Cody P Schafer
2013-01-16  0:24   ` Cody P Schafer
2013-01-16  0:24 ` [PATCH 12/17] mm/memory_hotplug: use pgdat_end_pfn() instead of open coding the same Cody P Schafer
2013-01-16  0:24   ` Cody P Schafer
2013-01-16  0:24 ` [PATCH 13/17] mm: add SECTION_IN_PAGE_FLAGS Cody P Schafer
2013-01-16  0:24   ` Cody P Schafer
2013-01-16  0:24 ` [PATCH 14/17] mm/memory_hotplug: factor out zone+pgdat growth Cody P Schafer
2013-01-16  0:24   ` Cody P Schafer
2013-01-16  1:27   ` Dave Hansen
2013-01-16  1:27     ` Dave Hansen
2013-01-16  0:24 ` [PATCH 15/17] mm/page_alloc: add informative debugging message in page_outside_zone_boundaries() Cody P Schafer
2013-01-16  0:24   ` Cody P Schafer
2013-01-16  1:34   ` Dave Hansen
2013-01-16  1:34     ` Dave Hansen
2013-01-16  0:24 ` [PATCH 16/17] mm/memory_hotplug: use zone_end_pfn() instead of open coding Cody P Schafer
2013-01-16  0:24   ` Cody P Schafer
2013-01-16  0:24 ` [PATCH 17/17] mm/compaction: use zone_end_pfn() Cody P Schafer
2013-01-16  0:24   ` Cody P Schafer
2013-01-16  1:39   ` Dave Hansen [this message]
2013-01-16  1:39     ` Dave Hansen

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=50F604D4.407@linux.vnet.ibm.com \
    --to=dave@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=catalin.marinas@arm.com \
    --cc=cody@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.