All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Daniel Kiper <dkiper@net-space.pl>
Cc: ian.campbell@citrix.com, haicheng.li@linux.intel.com,
	fengguang.wu@intel.com, jeremy@goop.org, konrad.wilk@oracle.com,
	dan.magenheimer@oracle.com, v.tolstov@selfip.ru, pasik@iki.fi,
	dave@linux.vnet.ibm.com, wdauchy@gmail.com, rientjes@google.com,
	xen-devel@lists.xensource.com, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org
Subject: Re: [PATCH V4] mm: Extend memory hotplug API to allow memory hotplug in virtual machines
Date: Thu, 2 Jun 2011 12:26:07 -0700	[thread overview]
Message-ID: <20110602122607.3122e23b.akpm@linux-foundation.org> (raw)
In-Reply-To: <20110524222733.GA29133@router-fw-old.local.net-space.pl>

On Wed, 25 May 2011 00:27:33 +0200
Daniel Kiper <dkiper@net-space.pl> wrote:

> This patch applies to Linus' git tree, git commit 98b98d316349e9a028e632629fe813d07fa5afdd
> (Merge branch 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6)
> with a few prerequisite patches available at https://lkml.org/lkml/2011/5/2/296
> and https://lkml.org/lkml/2011/5/17/408 (all prerequisite patches were included in -mm tree).
> 
> This patch contains online_page_callback and apropriate functions for
> registering/unregistering online page callbacks. It allows to do some
> machine specific tasks during online page stage which is required
> to implement memory hotplug in virtual machines. Currently this patch
> is required by latest memory hotplug support for Xen balloon driver
> patch which will be posted soon.
> 
> Additionally, originial online_page() function was splited into
> following functions doing "atomic" operations:
>   - __online_page_set_limits() - set new limits for memory management code,
>   - __online_page_increment_counters() - increment totalram_pages and totalhigh_pages,
>   - __online_page_free() - free page to allocator.
> 
> It was done to:
>   - not duplicate existing code,
>   - ease hotplug code devolpment by usage of well defined interface,
>   - avoid stupid bugs which are unavoidable when the same code
>     (by design) is developed in many places.

I grabbed this and the xen patch.  I assume that all prerequisites
are now in mainline?

Please give some thought to making this extra code Kconfigurable, and
selected by Xen?  See if we can avoid a bit of bloat for other kernel
users.

What is missing from the patchset is an explanation of why we should
merge it ;) Why is this feature desirable?  What value does it provide
to our users?  Why should we bother?  Answering these questions in a
form which can be pasted into the changelog would be convenient,
thanks.

Is there any propsect that the other virtualisation schemes will use
this facility?  If not, why not?

>
> ...
>
> @@ -388,7 +450,7 @@ static int online_pages_range(unsigned long start_pfn, unsigned long nr_pages,
>  	if (PageReserved(pfn_to_page(start_pfn)))
>  		for (i = 0; i < nr_pages; i++) {
>  			page = pfn_to_page(start_pfn + i);
> -			online_page(page);
> +			online_page_callback(page);

nit.  I'll change this to

			(*online_page_callback)(page);

because that syntax communicates some useful information to the reader.

WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@linux-foundation.org>
To: Daniel Kiper <dkiper@net-space.pl>
Cc: ian.campbell@citrix.com, haicheng.li@linux.intel.com,
	fengguang.wu@intel.com, jeremy@goop.org, konrad.wilk@oracle.com,
	dan.magenheimer@oracle.com, v.tolstov@selfip.ru, pasik@iki.fi,
	dave@linux.vnet.ibm.com, wdauchy@gmail.com, rientjes@google.com,
	xen-devel@lists.xensource.com, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org
Subject: Re: [PATCH V4] mm: Extend memory hotplug API to allow memory hotplug in virtual machines
Date: Thu, 2 Jun 2011 12:26:07 -0700	[thread overview]
Message-ID: <20110602122607.3122e23b.akpm@linux-foundation.org> (raw)
In-Reply-To: <20110524222733.GA29133@router-fw-old.local.net-space.pl>

On Wed, 25 May 2011 00:27:33 +0200
Daniel Kiper <dkiper@net-space.pl> wrote:

> This patch applies to Linus' git tree, git commit 98b98d316349e9a028e632629fe813d07fa5afdd
> (Merge branch 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6)
> with a few prerequisite patches available at https://lkml.org/lkml/2011/5/2/296
> and https://lkml.org/lkml/2011/5/17/408 (all prerequisite patches were included in -mm tree).
> 
> This patch contains online_page_callback and apropriate functions for
> registering/unregistering online page callbacks. It allows to do some
> machine specific tasks during online page stage which is required
> to implement memory hotplug in virtual machines. Currently this patch
> is required by latest memory hotplug support for Xen balloon driver
> patch which will be posted soon.
> 
> Additionally, originial online_page() function was splited into
> following functions doing "atomic" operations:
>   - __online_page_set_limits() - set new limits for memory management code,
>   - __online_page_increment_counters() - increment totalram_pages and totalhigh_pages,
>   - __online_page_free() - free page to allocator.
> 
> It was done to:
>   - not duplicate existing code,
>   - ease hotplug code devolpment by usage of well defined interface,
>   - avoid stupid bugs which are unavoidable when the same code
>     (by design) is developed in many places.

I grabbed this and the xen patch.  I assume that all prerequisites
are now in mainline?

Please give some thought to making this extra code Kconfigurable, and
selected by Xen?  See if we can avoid a bit of bloat for other kernel
users.

What is missing from the patchset is an explanation of why we should
merge it ;) Why is this feature desirable?  What value does it provide
to our users?  Why should we bother?  Answering these questions in a
form which can be pasted into the changelog would be convenient,
thanks.

Is there any propsect that the other virtualisation schemes will use
this facility?  If not, why not?

>
> ...
>
> @@ -388,7 +450,7 @@ static int online_pages_range(unsigned long start_pfn, unsigned long nr_pages,
>  	if (PageReserved(pfn_to_page(start_pfn)))
>  		for (i = 0; i < nr_pages; i++) {
>  			page = pfn_to_page(start_pfn + i);
> -			online_page(page);
> +			online_page_callback(page);

nit.  I'll change this to

			(*online_page_callback)(page);

because that syntax communicates some useful information to the reader.

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

  reply	other threads:[~2011-06-02 19:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-24 22:27 [PATCH V4] mm: Extend memory hotplug API to allow memory hotplug in virtual machines Daniel Kiper
2011-05-24 22:27 ` Daniel Kiper
2011-06-02 19:26 ` Andrew Morton [this message]
2011-06-02 19:26   ` Andrew Morton
2011-06-05 16:38   ` Daniel Kiper
2011-06-05 16:38     ` Daniel Kiper
2011-06-06 14:56     ` Konrad Rzeszutek Wilk
2011-06-06 14:56       ` Konrad Rzeszutek Wilk
  -- strict thread matches above, loose matches on Subject: below --
2011-05-24 22:27 Daniel Kiper

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=20110602122607.3122e23b.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=dan.magenheimer@oracle.com \
    --cc=dave@linux.vnet.ibm.com \
    --cc=dkiper@net-space.pl \
    --cc=fengguang.wu@intel.com \
    --cc=haicheng.li@linux.intel.com \
    --cc=ian.campbell@citrix.com \
    --cc=jeremy@goop.org \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=pasik@iki.fi \
    --cc=rientjes@google.com \
    --cc=v.tolstov@selfip.ru \
    --cc=wdauchy@gmail.com \
    --cc=xen-devel@lists.xensource.com \
    /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.