linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Collapse all Print all In new window Guaranteed allocation of huge pages (1G) using movablecore=N doesn't seem to work at all.
@ 2017-11-03 23:31 Maxim Levitsky
  2017-11-03 23:33 ` Maxim Levitsky
  0 siblings, 1 reply; 2+ messages in thread
From: Maxim Levitsky @ 2017-11-03 23:31 UTC (permalink / raw)
  To: LKML

Hi!

My system has 64G of ram and I want to create 32 1G huge pages to use
in KVM virtualization,
on demand, only when VM is running.

So I booted the kernel with
'hugepagesz=1G hugepages=0 default_hugepagesz=1G movablecore=40G'

However I still can't allocate the pages reliably.
For instance this simple script is enough to make it not possible to
even allocate one 1G huge page after few dozens of iterations:

while true ; do
    sudo hugeadm  --enable-zone-movable  --pool-pages-min 1G:0G
    sudo hugeadm  --enable-zone-movable  --pool-pages-min 1G:60G
done


I disabled mlock systemwide (now ulimit -l shows 0), I still see 8
pages mlocked in  zone 'Movable' but this is not enough to explain
this
nr_mlock     8

I do have around 64GB of swap too, but I see no even an attempt to use it.


# free
              total        used        free      shared  buff/cache   available
Mem:       65887928     1748344    62640276       61688     1499308    62053832
Swap:      67108860           0    67108860

Any idea about what is going on?

This was tested on 4.14.0-rc5 (my custom compiled) and on several
older kernels from ubuntu repositories.

Disabling/enabling transparent huge pages in the kernel config didn't
make a difference.

VT-d was enabled during the tests (intel_iommu=on,igfx_off) is that
would make any difference, but no VM was started when I run the above
script, in fact I run it just after the system booted.

Best regards,
          Maxim Levitsky

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Collapse all Print all In new window Guaranteed allocation of huge pages (1G) using movablecore=N doesn't seem to work at all.
  2017-11-03 23:31 Collapse all Print all In new window Guaranteed allocation of huge pages (1G) using movablecore=N doesn't seem to work at all Maxim Levitsky
@ 2017-11-03 23:33 ` Maxim Levitsky
  0 siblings, 0 replies; 2+ messages in thread
From: Maxim Levitsky @ 2017-11-03 23:33 UTC (permalink / raw)
  To: LKML

Sorry for garbaged title - I copy & pased from older mail which I by
mistake sent in HTML (had to use gmail web interface here)

Beset regards,
         Maxim Levitsky

On Sat, Nov 4, 2017 at 1:31 AM, Maxim Levitsky <maximlevitsky@gmail.com> wrote:
> Hi!
>
> My system has 64G of ram and I want to create 32 1G huge pages to use
> in KVM virtualization,
> on demand, only when VM is running.
>
> So I booted the kernel with
> 'hugepagesz=1G hugepages=0 default_hugepagesz=1G movablecore=40G'
>
> However I still can't allocate the pages reliably.
> For instance this simple script is enough to make it not possible to
> even allocate one 1G huge page after few dozens of iterations:
>
> while true ; do
>     sudo hugeadm  --enable-zone-movable  --pool-pages-min 1G:0G
>     sudo hugeadm  --enable-zone-movable  --pool-pages-min 1G:60G
> done
>
>
> I disabled mlock systemwide (now ulimit -l shows 0), I still see 8
> pages mlocked in  zone 'Movable' but this is not enough to explain
> this
> nr_mlock     8
>
> I do have around 64GB of swap too, but I see no even an attempt to use it.
>
>
> # free
>               total        used        free      shared  buff/cache   available
> Mem:       65887928     1748344    62640276       61688     1499308    62053832
> Swap:      67108860           0    67108860
>
> Any idea about what is going on?
>
> This was tested on 4.14.0-rc5 (my custom compiled) and on several
> older kernels from ubuntu repositories.
>
> Disabling/enabling transparent huge pages in the kernel config didn't
> make a difference.
>
> VT-d was enabled during the tests (intel_iommu=on,igfx_off) is that
> would make any difference, but no VM was started when I run the above
> script, in fact I run it just after the system booted.
>
> Best regards,
>           Maxim Levitsky

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-11-03 23:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-03 23:31 Collapse all Print all In new window Guaranteed allocation of huge pages (1G) using movablecore=N doesn't seem to work at all Maxim Levitsky
2017-11-03 23:33 ` Maxim Levitsky

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