All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Shuklin <george.shuklin@gmail.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	David Vrabel <david.vrabel@citrix.com>,
	"sandr8@gmail.com" <sandr8@gmail.com>
Subject: Re: a ton of kernel issues
Date: Wed, 14 Dec 2011 02:53:15 +0400	[thread overview]
Message-ID: <4EE7D75B.6080209@gmail.com> (raw)
In-Reply-To: <1323815427.20936.96.camel@dagon.hellion.org.uk>

On 14.12.2011 02:30, Ian Campbell wrote:
> On Tue, 2011-12-13 at 20:59 +0000, George Shuklin wrote:
>> On 13.12.2011 17:37, Ian Campbell wrote:
>>>> This should work if memory hotplug is enabled.
>>>>
>>>> It is also supported without memory hotplug but this requires that the
>>>> tools supply a suitable memory map that covers the largest
>>>> memory-static-max limit you wish to support.  I'm not sure if the tools
>>>> can do this yet.
>>> With xl this should work using the "maxmem" option. (xm probably uses
>>> the same name)
>>>
>> I'm not sure what maxmem do
> maxmem sets static-max for the guest in the xl toolstack.

Well, I understand that, I simply don't understand what maxmem do with 
domain in xen (the hypervisor part). My hypothesis is just put a limit 
for amount of allocated PFN for domain.

>
>> but I can say, this option does not allow
>> to go beyond initial boot memory for pv_ops kernels and beyond
>> static-max memory for -xen kernel.
> AFAIK the toolstack support for memory hotplug (i.e. growing beyond
> static-max) does not yet exist.

As far as I know toolstack is not really do some work for this (if I 
wrong I'll be really appreciated for information). For memory control we 
need to set maxmem and send request to guest xenballon for new target 
(via xenstore). This works without running xapi and squeezed (of course, 
for VM start/reboot we need them), but simple memory management can be 
done manually without helps of xapi/squeezed. (Again, if I wrong, I do 
really like to now where I wrong).  As far as I understand xapi writing 
dynamic-min, dynamic-max to xenstore for domain and call squeezed via 
xenstore-rpc to rebalance memory, and squeezed read request, read those 
values, calculate new target and writes it  to xenstore for each domain.

My current description (I can be wrong) of stuff happens during memory 
resizing:
1) Set up maxmem
2) Send via memory/target target to xenballoon
3) Xenballoon request new  memory from hypervisor (or return back some of)
4) Xenballoon manipulate with domU memory management to allow use (or 
snatch away) memory pages.
>> I tested it with following python script (under xcp, with shutdowned
>> squeezed to be sure not get 'reballanced'):
>>
>> xc.domain_setmaxmem(domid,memory)
>> xs.write("","/local/domain/%i/memory/dynamic-min"%domid,str(memory*1024))
>> xs.write("","/local/domain/%i/memory/dynamic-max"%domid,str(memory*1024))
>> xs.write("","/local/domain/%i/memory/static-max"%domid,str(memory*1024))
>> xs.write("","/local/domain/%i/memory/target"%domid,str(memory*1024))
>>
>> It works fine within noted ranges, but simply ignores any request higher
>> them.
> If you are stepping outside the toolstack and doing this sort of thing
> behind its back then all bets are off and you can't really expect people
> here to help you.
>
> Please try and reproduce the issue using the standard toolstack options.
>
I am very well understand that, so I've tested this (not with all kernel 
versions) with normal XCP setup with default memory management:
set up vm, make dyn-max=1GiB,static-max=2GiB, start vm, use xe 
vm-memory-target-set to 2GiB - and memory is still 1GiB.
I've tested this with few pv_ops kernels, including those on 
xs-tools.iso (tested on XCP 0.5, 1.0 and 1.1, and even on XenServer 6) - 
same result.


P.S. Thank you for your attention to this issue.

  reply	other threads:[~2011-12-13 22:53 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-12 21:44 a ton of kernel issues Tim Evers
2011-12-12 21:56 ` Konrad Rzeszutek Wilk
2011-12-14  9:00   ` Tim Evers
2011-12-15  1:25     ` Konrad Rzeszutek Wilk
2011-12-13  9:09 ` George Shuklin
2011-12-13 10:19   ` Alessandro Salvatori
2011-12-13 10:36     ` George Shuklin
2011-12-13 13:17       ` David Vrabel
2011-12-13 13:37         ` Ian Campbell
2011-12-13 20:59           ` George Shuklin
2011-12-13 22:30             ` Ian Campbell
2011-12-13 22:53               ` George Shuklin [this message]
2011-12-14  7:25                 ` Ian Campbell
2011-12-14 12:16                   ` Ian Campbell
2011-12-14 12:21                     ` David Vrabel
2011-12-14 13:11                     ` Jan Beulich
2011-12-14 13:48                       ` Ian Campbell
2011-12-14 17:44                     ` Konrad Rzeszutek Wilk
2011-12-15 12:45                     ` George Shuklin
2011-12-15 16:26                       ` Konrad Rzeszutek Wilk
2011-12-13 21:05         ` George Shuklin
2011-12-13 21:45           ` Konrad Rzeszutek Wilk
2011-12-14 12:28             ` David Vrabel
2011-12-14 16:57               ` Konrad Rzeszutek Wilk
2011-12-14  7:47           ` Fajar A. Nugraha
2011-12-14 18:40             ` George Shuklin
2011-12-13 14:18       ` Konrad Rzeszutek Wilk
2011-12-13 21:10         ` George Shuklin
2011-12-13 21:38           ` Konrad Rzeszutek Wilk

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=4EE7D75B.6080209@gmail.com \
    --to=george.shuklin@gmail.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=david.vrabel@citrix.com \
    --cc=sandr8@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.