All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
To: Juergen Gross <jgross@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: Increasing domain memory beyond initial maxmem
Date: Wed, 6 Apr 2022 14:58:37 +0200	[thread overview]
Message-ID: <Yk2OfpSaz9U0agrn@mail-itl> (raw)
In-Reply-To: <8e392b3c-8808-509e-adb7-f4a3c1a5c86c@suse.com>

[-- Attachment #1: Type: text/plain, Size: 3393 bytes --]

On Wed, Apr 06, 2022 at 07:13:18AM +0200, Juergen Gross wrote:
> On 05.04.22 18:24, Marek Marczykowski-Górecki wrote:
> > On Tue, Apr 05, 2022 at 01:03:57PM +0200, Juergen Gross wrote:
> > > Hi Marek,
> > > 
> > > On 31.03.22 14:36, Marek Marczykowski-Górecki wrote:
> > > > On Thu, Mar 31, 2022 at 02:22:03PM +0200, Juergen Gross wrote:
> > > > > Maybe some kernel config differences, or other udev rules (memory onlining
> > > > > is done via udev in my guest)?
> > > > > 
> > > > > I'm seeing:
> > > > > 
> > > > > # zgrep MEMORY_HOTPLUG /proc/config.gz
> > > > > CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
> > > > > CONFIG_MEMORY_HOTPLUG=y
> > > > > # CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE is not set
> > > > > CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=y
> > > > > CONFIG_XEN_MEMORY_HOTPLUG_LIMIT=512
> > > > 
> > > > I have:
> > > > # zgrep MEMORY_HOTPLUG /proc/config.gz
> > > > CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
> > > > CONFIG_MEMORY_HOTPLUG=y
> > > > CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=y
> > > > CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=y
> > > > CONFIG_XEN_MEMORY_HOTPLUG_LIMIT=512
> > > > 
> > > > Not sure if relevant, but I also have:
> > > > CONFIG_XEN_UNPOPULATED_ALLOC=y
> > > > 
> > > > on top of that, I have a similar udev rule too:
> > > > 
> > > > SUBSYSTEM=="memory", ACTION=="add", ATTR{state}=="offline", ATTR{state}="online"
> > > > 
> > > > But I don't think they are conflicting.
> > > > 
> > > > > What type of guest are you using? Mine was a PVH guest.
> > > > 
> > > > PVH here too.
> > > 
> > > Would you like to try the attached patch? It seemed to work for me.
> > 
> > Unfortunately it doesn't help, now the behavior is different:
> > 
> > Initially guest started with 800M:
> > 
> >      [root@personal ~]# free -m
> >                    total        used        free      shared  buff/cache   available
> >      Mem:            740         223         272           2         243         401
> >      Swap:          1023           0        1023
> > 
> > Then increased:
> > 
> >      [root@dom0 ~]$ xl mem-max personal 2048
> >      [root@dom0 ~]$ xenstore-write /local/domain/$(xl domid personal)/memory/static-max $((2048*1024))
> >      [root@dom0 ~]$ xl mem-set personal 2000
> > 
> > And guest shows now only a little more memory, but not full 2000M:
> > 
> >      [root@personal ~]# [   37.657046] xen:balloon: Populating new zone
> >      [   37.658206] Fallback order for Node 0: 0
> >      [   37.658219] Built 1 zonelists, mobility grouping on.  Total pages: 175889
> >      [   37.658233] Policy zone: Normal
> > 
> >      [root@personal ~]#
> >      [root@personal ~]# free -m
> >                    total        used        free      shared  buff/cache   available
> >      Mem:            826         245         337           2         244         462
> >      Swap:          1023           0        1023
> > 
> > 
> > I've applied the patch on top of 5.16.18. If you think 5.17 would make a
> > difference, I can try that too.
> 
> Hmm, weird.
> 
> Can you please post the output of
> 
> cat /proc/buddyinfo
> cat /proc/iomem
> 
> in the guest before and after the operations?

Ok, that was a stupid mistake on my side - I've run out of host memory.
With that fixed, it seems to work, on 5.16.18 too.

-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      reply	other threads:[~2022-04-06 12:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-31  3:51 Increasing domain memory beyond initial maxmem Marek Marczykowski-Górecki
2022-03-31  6:41 ` Juergen Gross
2022-03-31 12:01   ` Marek Marczykowski-Górecki
2022-03-31 12:22     ` Juergen Gross
2022-03-31 12:36       ` Marek Marczykowski-Górecki
2022-04-05 11:03         ` Juergen Gross
2022-04-05 16:24           ` Marek Marczykowski-Górecki
2022-04-06  5:13             ` Juergen Gross
2022-04-06 12:58               ` Marek Marczykowski-Górecki [this message]

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=Yk2OfpSaz9U0agrn@mail-itl \
    --to=marmarek@invisiblethingslab.com \
    --cc=jgross@suse.com \
    --cc=xen-devel@lists.xenproject.org \
    /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.