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]
Message-ID: <20101230123013.GA12765@router-fw-old.local.net-space.pl>
Date:	Thu, 30 Dec 2010 13:30:13 +0100
From:	Daniel Kiper <dkiper@...-space.pl>
To:	David Rientjes <rientjes@...gle.com>
Cc:	Daniel Kiper <dkiper@...-space.pl>, ian.campbell@...rix.com,
	Andrew Morton <akpm@...ux-foundation.org>,
	Andi Kleen <andi.kleen@...el.com>, haicheng.li@...ux.intel.com,
	fengguang.wu@...el.com, jeremy@...p.org, konrad.wilk@...cle.com,
	dan.magenheimer@...cle.com, v.tolstov@...fip.ru,
	xen-devel@...ts.xensource.com, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
Subject: Re: [PATCH R2 1/7] mm: Add add_registered_memory() to memory hotplug API

Hi,

On Wed, Dec 29, 2010 at 04:50:25PM -0800, David Rientjes wrote:
> On Wed, 29 Dec 2010, Daniel Kiper wrote:
>
> > diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
> > index 864035f..2458b2f 100644
> > --- a/include/linux/memory_hotplug.h
> > +++ b/include/linux/memory_hotplug.h
> > @@ -203,6 +203,7 @@ static inline int is_mem_section_removable(unsigned long pfn,
> >  #endif /* CONFIG_MEMORY_HOTREMOVE */
> >
> >  extern int mem_online_node(int nid);
> > +extern int add_registered_memory(int nid, u64 start, u64 size);
> >  extern int add_memory(int nid, u64 start, u64 size);
> >  extern int arch_add_memory(int nid, u64 start, u64 size);
> >  extern int remove_memory(u64 start, u64 size);
> > diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
> > index dd186c1..b642f26 100644
> > --- a/mm/memory_hotplug.c
> > +++ b/mm/memory_hotplug.c
> > @@ -509,20 +509,12 @@ out:
> >  }
> >
> >  /* we are OK calling __meminit stuff here - we have CONFIG_MEMORY_HOTPLUG */
> > -int __ref add_memory(int nid, u64 start, u64 size)
> > +static int __ref __add_memory(int nid, u64 start, u64 size)
> >  {
> >  	pg_data_t *pgdat = NULL;
> >  	int new_pgdat = 0;
> > -	struct resource *res;
> >  	int ret;
> >
> > -	lock_system_sleep();
> > -
> > -	res = register_memory_resource(start, size);
> > -	ret = -EEXIST;
> > -	if (!res)
> > -		goto out;
> > -
> >  	if (!node_online(nid)) {
> >  		pgdat = hotadd_new_pgdat(nid, start);
> >  		ret = -ENOMEM;
>
> Looks like this patch was based on a kernel before 2.6.37-rc4 since it
> doesn't have 20d6c96b5f (mem-hotplug: introduce {un}lock_memory_hotplug())

As I wrote in "[PATCH R2 0/7] Xen memory balloon driver with memoryhotplug
support" this patch applies to Linux kernel Ver. 2.6.36.

> Lots of unnecessary empty lines here, and scripts/checkpatch.pl says there
> are trailing whitespaces as well.

Strange. I tested it with this script and I received:

0001-mm-Add-add_registered_memory-to-memory-hotplug-API.txt has no
obvious style problems and is ready for submission.

I do not know why my e-mail was mangled. For your convenience
I am sending this patch as attachment.

Empty lines are added for better readability (it is my
opinion) however, I do not insist to leave this patch
with that formating.

Daniel

View attachment "0001-mm-Add-add_registered_memory-to-memory-hotplug-API.txt" of type "text/plain" (2536 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ