* [PATCH 2/3] page_alloc: break early in check_for_regular_memory()
@ 2011-12-20 10:02 Bob Liu
2011-12-20 14:31 ` Michal Hocko
2011-12-21 0:17 ` KAMEZAWA Hiroyuki
0 siblings, 2 replies; 3+ messages in thread
From: Bob Liu @ 2011-12-20 10:02 UTC (permalink / raw)
To: linux-mm; +Cc: akpm, mgorman, tj, kamezawa.hiroyu, aarcange, Bob Liu
If there is a zone below ZONE_NORMAL has present_pages, we can set
node state to N_NORMAL_MEMORY, no need to loop to end.
Signed-off-by: Bob Liu <lliubbo@gmail.com>
---
mm/page_alloc.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 7f28eb8..8d64ba0 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -4671,8 +4671,10 @@ static void check_for_regular_memory(pg_data_t *pgdat)
for (zone_type = 0; zone_type <= ZONE_NORMAL; zone_type++) {
struct zone *zone = &pgdat->node_zones[zone_type];
- if (zone->present_pages)
+ if (zone->present_pages) {
node_set_state(zone_to_nid(zone), N_NORMAL_MEMORY);
+ break;
+ }
}
#endif
}
--
1.7.0.4
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2/3] page_alloc: break early in check_for_regular_memory()
2011-12-20 10:02 [PATCH 2/3] page_alloc: break early in check_for_regular_memory() Bob Liu
@ 2011-12-20 14:31 ` Michal Hocko
2011-12-21 0:17 ` KAMEZAWA Hiroyuki
1 sibling, 0 replies; 3+ messages in thread
From: Michal Hocko @ 2011-12-20 14:31 UTC (permalink / raw)
To: Bob Liu; +Cc: linux-mm, akpm, mgorman, tj, kamezawa.hiroyu, aarcange
On Tue 20-12-11 18:02:39, Bob Liu wrote:
> If there is a zone below ZONE_NORMAL has present_pages, we can set
> node state to N_NORMAL_MEMORY, no need to loop to end.
>
> Signed-off-by: Bob Liu <lliubbo@gmail.com>
Looks good.
Reviewed-by: Michal Hocko <mhocko@suse.cz>
Thanks
> ---
> mm/page_alloc.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 7f28eb8..8d64ba0 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -4671,8 +4671,10 @@ static void check_for_regular_memory(pg_data_t *pgdat)
>
> for (zone_type = 0; zone_type <= ZONE_NORMAL; zone_type++) {
> struct zone *zone = &pgdat->node_zones[zone_type];
> - if (zone->present_pages)
> + if (zone->present_pages) {
> node_set_state(zone_to_nid(zone), N_NORMAL_MEMORY);
> + break;
> + }
> }
> #endif
> }
> --
> 1.7.0.4
>
>
> --
> 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/ .
> Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
--
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9
Czech Republic
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 2/3] page_alloc: break early in check_for_regular_memory()
2011-12-20 10:02 [PATCH 2/3] page_alloc: break early in check_for_regular_memory() Bob Liu
2011-12-20 14:31 ` Michal Hocko
@ 2011-12-21 0:17 ` KAMEZAWA Hiroyuki
1 sibling, 0 replies; 3+ messages in thread
From: KAMEZAWA Hiroyuki @ 2011-12-21 0:17 UTC (permalink / raw)
To: Bob Liu; +Cc: linux-mm, akpm, mgorman, tj, aarcange
On Tue, 20 Dec 2011 18:02:39 +0800
Bob Liu <lliubbo@gmail.com> wrote:
> If there is a zone below ZONE_NORMAL has present_pages, we can set
> node state to N_NORMAL_MEMORY, no need to loop to end.
>
> Signed-off-by: Bob Liu <lliubbo@gmail.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-12-21 0:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-20 10:02 [PATCH 2/3] page_alloc: break early in check_for_regular_memory() Bob Liu
2011-12-20 14:31 ` Michal Hocko
2011-12-21 0:17 ` KAMEZAWA Hiroyuki
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.