linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Dave Hansen <dave@linux.vnet.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Yasunori Goto <y-goto@jp.fujitsu.com>,
	Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>,
	Christoph Lameter <clameter@sgi.com>
Subject: Re: [PATCH 5 of 6] hotplug-memory: add section_ops
Date: Thu, 03 Apr 2008 18:12:58 -0700	[thread overview]
Message-ID: <47F5809A.7040307@goop.org> (raw)
In-Reply-To: <1207270272.943.27.camel@nimitz.home.sr71.net>

Dave Hansen wrote:
> On Thu, 2008-04-03 at 17:05 -0700, Jeremy Fitzhardinge wrote:
>   
>> Add a per-section "section_ops" structure,  allowing each section to have
>> specific functions for onlining and offlining pages within the section.
>> This is used by the Xen balloon driver to make sure that pages are not
>> onlined without some physical memory backing them.
>>     
>
> This is kinda a lot of code and mucking around for what we actually get
> out of it, especially since you just condensed down all the actual
> online_page() instances.
>   

I agree, but it seemed like the most straightforward and architecturally 
cleanest approach to me.

> I think it might just be nicer to have a global list of these handlers
> somewhere.  The Xen driver can just say "put me on the list of
> callbacks" and we'll call them at online_page().  I really don't think
> we need to be passing an ops structure around.
>   

Yes, but it seems a bit awkward.  If we assume that:

   1. Xen will be the only user of the hook, and
   2. Xen-balloon hotplug is exclusive of real memory hotplug

then I guess its reasonable (though if that's the case it would be 
simpler to just put a direct call under #ifdef CONFIG_XEN_BALLOON in there).

But if we think there can be multiple callbacks, and they all get called 
on the online of each page, and there can be multiple kinds of hotplug 
memory it gets pretty messy.  Each has to determine "why was I called on 
this page?" and you'd to work out which one actually does the job of 
onlining.  It just seems cleaner to say "this section needs to be 
onlined like this", and there's no ambiguity.

I'm already anticipating using the ops mechanism to support another 
class of Xen hotplug memory for managing large pages.

    J

  reply	other threads:[~2008-04-04  1:14 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-04  0:05 [PATCH 0 of 6] [RFC] another attempt at making hotplug memory and xen play together Jeremy Fitzhardinge
2008-04-04  0:05 ` [PATCH 1 of 6] hotplug-memory: refactor online_pages to separate zone growth from page onlining Jeremy Fitzhardinge
2008-04-04  1:06   ` Dave Hansen
2008-04-04  1:20     ` Jeremy Fitzhardinge
2008-04-04  1:33       ` Dave Hansen
2008-04-04  1:09   ` Dave Hansen
2008-04-04  1:32     ` Jeremy Fitzhardinge
2008-04-04  1:41       ` Dave Hansen
2008-04-04  1:56   ` Yasunori Goto
2008-04-04  5:34     ` Jeremy Fitzhardinge
2008-04-04  0:05 ` [PATCH 2 of 6] xen: make phys_to_machine structure dynamic Jeremy Fitzhardinge
2008-04-04  0:05 ` [PATCH 3 of 6] xen-balloon: use memory hot-add to expand the domain's memory Jeremy Fitzhardinge
2008-04-04  0:05 ` [PATCH 4 of 6] hotplug-memory: use common online_page Jeremy Fitzhardinge
2008-04-04  0:47   ` Dave Hansen
2008-04-04  0:56     ` Jeremy Fitzhardinge
2008-04-04  1:00       ` Dave Hansen
2008-04-04  1:11         ` Jeremy Fitzhardinge
2008-04-04  1:22           ` Dave Hansen
2008-04-04  0:05 ` [PATCH 5 of 6] hotplug-memory: add section_ops Jeremy Fitzhardinge
2008-04-04  0:51   ` Dave Hansen
2008-04-04  1:12     ` Jeremy Fitzhardinge [this message]
2008-04-04  1:52       ` Dave Hansen
2008-04-04  5:32         ` Jeremy Fitzhardinge
2008-04-04 14:22           ` Dave Hansen
2008-04-04 18:21             ` Jeremy Fitzhardinge
2008-04-04 19:28               ` Christoph Lameter
2008-04-04 20:38                 ` Jeremy Fitzhardinge
2008-04-04  1:47     ` KAMEZAWA Hiroyuki
2008-04-04  5:35       ` Jeremy Fitzhardinge
2008-04-04  0:05 ` [PATCH 6 of 6] xen-balloon: define a section_ops Jeremy Fitzhardinge

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=47F5809A.7040307@goop.org \
    --to=jeremy@goop.org \
    --cc=clameter@sgi.com \
    --cc=dave@linux.vnet.ibm.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=y-goto@jp.fujitsu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).