[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110518103543.GA5066@router-fw-old.local.net-space.pl>
Date: Wed, 18 May 2011 12:35:43 +0200
From: Daniel Kiper <dkiper@...-space.pl>
To: Vasiliy G Tolstov <v.tolstov@...fip.ru>
Cc: Ian Campbell <Ian.Campbell@...citrix.com>,
Daniel Kiper <dkiper@...-space.pl>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"andi.kleen@...el.com" <andi.kleen@...el.com>,
"haicheng.li@...ux.intel.com" <haicheng.li@...ux.intel.com>,
"fengguang.wu@...el.com" <fengguang.wu@...el.com>,
"jeremy@...p.org" <jeremy@...p.org>,
"konrad.wilk@...cle.com" <konrad.wilk@...cle.com>,
Dan Magenheimer <dan.magenheimer@...cle.com>,
"pasik@....fi" <pasik@....fi>,
"dave@...ux.vnet.ibm.com" <dave@...ux.vnet.ibm.com>,
"wdauchy@...il.com" <wdauchy@...il.com>,
"rientjes@...gle.com" <rientjes@...gle.com>,
"xen-devel@...ts.xensource.com" <xen-devel@...ts.xensource.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>
Subject: Re: [PATCH V3] xen/balloon: Memory hotplug support for Xen balloon driver
On Wed, May 18, 2011 at 11:24:54AM +0400, Vasiliy G Tolstov wrote:
> On Wed, 2011-05-18 at 08:21 +0100, Ian Campbell wrote:
> > On Wed, 2011-05-18 at 07:57 +0100, Vasiliy G Tolstov wrote:
> > > On Tue, 2011-05-17 at 23:44 +0200, Daniel Kiper wrote:
> > > > + Memory could be hotplugged in following steps:
> > > > +
> > > > + 1) dom0: xl mem-max <domU> <maxmem>
> > > > + where <maxmem> is >= requested memory size,
> > > > +
> > > > + 2) dom0: xl mem-set <domU> <memory>
> > > > + where <memory> is requested memory size; alternatively memory
> > > > + could be added by writing proper value to
> > > > + /sys/devices/system/xen_memory/xen_memory0/target or
> > > > + /sys/devices/system/xen_memory/xen_memory0/target_kb on dumU,
> > > > +
> > > > + 3) domU: for i in /sys/devices/system/memory/memory*/state; do \
> > > > + [ "`cat "$i"`" = offline ] && echo online > "$i"; done
> >
> > > Very good. Is that possible to eliminate step 3 ? And do it automatic if
> > > domU runs with specific xen balloon param?
> >
> > When we faced the same question WRT VCPU hotplug we ended up using a
> > udev rule. Presumably the same could be done here. In the VCPU case the
> > rule is:
> >
> > ACTION=="add", SUBSYSTEM=="cpu", RUN+="/bin/sh -c '[ ! -e /sys$devpath/online ] || echo 1 > /sys$devpath/online'"
> >
> > Presumably the memory one will be broadly similar.
Here is proper udev rule:
SUBSYSTEM=="memory", ACTION=="add", RUN+="/bin/sh -c '[ -f /sys$devpath/state ] && echo online > /sys$devpath/state'"
Konrad, could you add it to git comment and Kconfig help ???
Daniel
--
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