lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 14 Sep 2007 11:02:43 +0900
From:	Yasunori Goto <y-goto@...fujitsu.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Andy Whitcroft <apw@...dowen.org>,
	Paul Mundt <lethal@...ux-sh.org>, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org
Subject: Re: [PATCH -mm] mm: Fix memory hotplug + sparsemem build.

> On Tue, 11 Sep 2007 18:37:12 +0900 Yasunori Goto <y-goto@...fujitsu.com> wrote:
> 
> > 
> > > > +	if (onlined_pages){
> > > 
> > > Nit, needs a space there before the '{'.
> > 
> > Ah, Ok. I attached fixed patch in this mail.
> > 
> > > The problem as I see it is that when we boot the system we start a
> > > kswapd on all nodes with memory.  If the hot-add adds memory to a
> > > pre-existing node with no memory we will not start one and we end up
> > > with a node with memory and no kswapd.  Bad.
> > > 
> > > As kswapd_run is a no-op when a kswapd already exists this seems a safe
> > > way to fix that.  Paul's ->zone conversion is obviously correct also.
> > > 
> > > Acked-by: Andy Whitcroft <apw@...dowen.org>
> > 
> > Thanks for your explanation.
> > You mentioned all of my intention correctly. :-)
> > 
> > 
> > ----
> > 
> > Fix kswapd doesn't run when memory is added on memory-less-node.
> > Fix compile error of zone->node when CONFIG_NUMA is off.
> > 
> > Signed-off-by: Yasunori Goto <y-goto@...fujitsu.com>
> > Signed-off-by: Paul Mundt <lethal@...ux-sh.org>
> > Acked-by: Andy Whitcroft <apw@...dowen.org>
> > 
> > 
> > ---
> >  mm/memory_hotplug.c |    9 ++++-----
> >  1 file changed, 4 insertions(+), 5 deletions(-)
> > 
> > Index: current/mm/memory_hotplug.c
> > ===================================================================
> > --- current.orig/mm/memory_hotplug.c	2007-09-07 18:08:07.000000000 +0900
> > +++ current/mm/memory_hotplug.c	2007-09-11 17:29:19.000000000 +0900
> > @@ -211,10 +211,12 @@ int online_pages(unsigned long pfn, unsi
> >  		online_pages_range);
> >  	zone->present_pages += onlined_pages;
> >  	zone->zone_pgdat->node_present_pages += onlined_pages;
> > -	if (onlined_pages)
> > -		node_set_state(zone->node, N_HIGH_MEMORY);
> >  
> >  	setup_per_zone_pages_min();
> > +	if (onlined_pages) {
> > +		kswapd_run(zone_to_nid(zone));
> > +		node_set_state(zone_to_nid(zone), N_HIGH_MEMORY);
> > +	}
> >  
> >  	if (need_zonelists_rebuild)
> >  		build_all_zonelists();
> > @@ -269,9 +271,6 @@ int add_memory(int nid, u64 start, u64 s
> >  		if (!pgdat)
> >  			return -ENOMEM;
> >  		new_pgdat = 1;
> > -		ret = kswapd_run(nid);
> > -		if (ret)
> > -			goto error;
> >  	}
> >  
> >  	/* call arch's memory hotadd */
> > 
> 
> OK, we're getting into a mess here.  This patch fixes
> update-n_high_memory-node-state-for-memory-hotadd.patch, but which patch
> does update-n_high_memory-node-state-for-memory-hotadd.patch fix?
> 
> At present I just whacked
> update-n_high_memory-node-state-for-memory-hotadd.patch at the end of
> everything, but that was lazy of me and it ends up making a mess.

It is enough. No more patch is necessary for these issues.
I already fixed about Andy-san's comment. :-)


Thanks.
-- 
Yasunori Goto 


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ