All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch]mm: initialize zone all_unreclaimable
@ 2011-09-26  8:11 Shaohua Li
  2011-09-26 13:23 ` Michal Hocko
  0 siblings, 1 reply; 4+ messages in thread
From: Shaohua Li @ 2011-09-26  8:11 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-mm

I saw DMA zone is always unreclaimable in my system. zone->all_unreclaimable
isn't initialized till a page from the zone is freed. This isn't a big problem
normally, but a little confused, so fix here.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 6e8ecb6..1facc05 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -4335,6 +4335,7 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat,
 		zone_pcp_init(zone);
 		for_each_lru(l)
 			INIT_LIST_HEAD(&zone->lru[l].list);
+		zone->all_unreclaimable = 0;
 		zone->reclaim_stat.recent_rotated[0] = 0;
 		zone->reclaim_stat.recent_rotated[1] = 0;
 		zone->reclaim_stat.recent_scanned[0] = 0;


--
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] 4+ messages in thread

* Re: [patch]mm: initialize zone all_unreclaimable
  2011-09-26  8:11 [patch]mm: initialize zone all_unreclaimable Shaohua Li
@ 2011-09-26 13:23 ` Michal Hocko
  2011-09-26 22:52   ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Michal Hocko @ 2011-09-26 13:23 UTC (permalink / raw)
  To: Shaohua Li; +Cc: Andrew Morton, linux-mm

On Mon 26-09-11 16:11:52, Shaohua Li wrote:
> I saw DMA zone is always unreclaimable in my system. 
> zone->all_unreclaimable isn't initialized till a page from the zone is
> freed. This isn't a big problem normally, but a little confused, so
> fix here.

The value is initialized when a node is allocated. setup_node_data uses
alloc_remap which memsets the whole structure or memblock allocation
which is initialized to 0 as well AFAIK and memory hotplug uses
arch_alloc_nodedata which is kzalloc.

> 
> Signed-off-by: Shaohua Li <shaohua.li@intel.com>
> 
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 6e8ecb6..1facc05 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -4335,6 +4335,7 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat,
>  		zone_pcp_init(zone);
>  		for_each_lru(l)
>  			INIT_LIST_HEAD(&zone->lru[l].list);
> +		zone->all_unreclaimable = 0;
>  		zone->reclaim_stat.recent_rotated[0] = 0;
>  		zone->reclaim_stat.recent_rotated[1] = 0;
>  		zone->reclaim_stat.recent_scanned[0] = 0;
> 
> 
> --
> 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] 4+ messages in thread

* Re: [patch]mm: initialize zone all_unreclaimable
  2011-09-26 13:23 ` Michal Hocko
@ 2011-09-26 22:52   ` Andrew Morton
  2011-09-27  1:10     ` Shaohua Li
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2011-09-26 22:52 UTC (permalink / raw)
  To: Michal Hocko; +Cc: Shaohua Li, linux-mm, Andrew Morton

On Mon, 26 Sep 2011 15:23:20 +0200
Michal Hocko <mhocko@suse.cz> wrote:

> On Mon 26-09-11 16:11:52, Shaohua Li wrote:
> > I saw DMA zone is always unreclaimable in my system. 
> > zone->all_unreclaimable isn't initialized till a page from the zone is
> > freed. This isn't a big problem normally, but a little confused, so
> > fix here.
> 
> The value is initialized when a node is allocated. setup_node_data uses
> alloc_remap which memsets the whole structure or memblock allocation
> which is initialized to 0 as well AFAIK and memory hotplug uses
> arch_alloc_nodedata which is kzalloc.

setup_node_data() does memset(NODE_DATA(nid), 0, sizeof(pg_data_t)) just
to be sure.

However, Shaohua reports that "DMA zone is always unreclaimable in my system",
and presumably this patch fixed it.  So we don't know what's going on?



Presumably all the other "zone->foo = 0" assignments in free_area_init_core()
are unneeded.

--
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] 4+ messages in thread

* Re: [patch]mm: initialize zone all_unreclaimable
  2011-09-26 22:52   ` Andrew Morton
@ 2011-09-27  1:10     ` Shaohua Li
  0 siblings, 0 replies; 4+ messages in thread
From: Shaohua Li @ 2011-09-27  1:10 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Michal Hocko, linux-mm, Andrew Morton

On Tue, 2011-09-27 at 06:52 +0800, Andrew Morton wrote:
> On Mon, 26 Sep 2011 15:23:20 +0200
> Michal Hocko <mhocko@suse.cz> wrote:
> 
> > On Mon 26-09-11 16:11:52, Shaohua Li wrote:
> > > I saw DMA zone is always unreclaimable in my system. 
> > > zone->all_unreclaimable isn't initialized till a page from the zone is
> > > freed. This isn't a big problem normally, but a little confused, so
> > > fix here.
> > 
> > The value is initialized when a node is allocated. setup_node_data uses
> > alloc_remap which memsets the whole structure or memblock allocation
> > which is initialized to 0 as well AFAIK and memory hotplug uses
> > arch_alloc_nodedata which is kzalloc.
> 
> setup_node_data() does memset(NODE_DATA(nid), 0, sizeof(pg_data_t)) just
> to be sure.
> 
> However, Shaohua reports that "DMA zone is always unreclaimable in my system",
> and presumably this patch fixed it.  So we don't know what's going on?
> 
> 
> 
> Presumably all the other "zone->foo = 0" assignments in free_area_init_core()
> are unneeded.
Looks I didn't run my test correctly, sorry. I just check it, and this
is a vmscan bug, I'll work out a new patch.

--
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] 4+ messages in thread

end of thread, other threads:[~2011-09-27  1:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-26  8:11 [patch]mm: initialize zone all_unreclaimable Shaohua Li
2011-09-26 13:23 ` Michal Hocko
2011-09-26 22:52   ` Andrew Morton
2011-09-27  1:10     ` Shaohua Li

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.