doc: move DM memory setup to GSG

DM memory allocation mechanism is better placed in the Getting Started
material, so move it there from the primer.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
This commit is contained in:
David B. Kinder 2018-05-21 21:16:26 -07:00 committed by lijinxia
parent 6e1582452d
commit 91f7391ad8
2 changed files with 36 additions and 37 deletions

View File

@ -311,6 +311,42 @@ Set up Reference UOS
:name: gsg-successful-boot
Device Manager memory allocation mechanism
==========================================
There are two Device Manager memory allocation mechanisms available:
- Contiguous Memory Allocator (CMA), and
- Huge Page Tables (HugeTLB). HugeTLB is the default.
To choose CMA, do the following:
1) Add ``cma=reserved_mem_size@recommend_memory_offset-0``, (for example
``cma=2560M@0x100000000-0``) to the SOS cmdline in ``acrn.conf``
2) Start ``acrn-dm`` *without* the ``-T`` option
To support HugeTLB, do the following:
1) Do huge page reservation
- For 1G huge page reservation, add ``hugepagesz=1G hugepages=reserved_pg_num``
(for example, ``hugepagesz=1G hugepages=4``) to the SOS cmdline in
``acrn.conf`` (for EFI)
- For 2M huge page reservation, after the SOS starts up, run the
command::
echo reserved_pg_num > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
.. note::
You can use 2M reserving method to do reservation for 1G page size, but it
may fail. For an EFI platform, you may skip 1G page reservation
by using a 2M page, but make sure your huge page reservation size is
large enough for your usage.
2) Start ``acrn-dm`` *with* the ``-T`` option.
Build ACRN from Source
**********************

View File

@ -936,40 +936,3 @@ or
.. code-block:: bash
screen /dev/pts/0
Device Manager memory allocation mechanism
******************************************
There are two Device Manager memory allocation mechanisms available:
- Contiguous Memory Allocator (CMA), and
- Huge Page Tables (HugeTLB). HugeTLB is the default.
To choose CMA, do the following:
1) Add ``cma=reserved_mem_size@recommend_memory_offset-0``, (for example
``cma=2560M@0x100000000-0``) to the SOS cmdline in ``acrn.conf``
2) Start ``acrn-dm`` *without* the ``-T`` option
To support HugeTLB, do the following:
1) Do huge page reservation
- For 1G huge page reservation, add ``hugepagesz=1G hugepages=reserved_pg_num``
(for example, ``hugepagesz=1G hugepages=4``) to the SOS cmdline in
``acrn.conf`` (for EFI)
- For 2M huge page reservation, after the SOS starts up, run the
command::
echo reserved_pg_num > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
.. note::
You can use 2M reserving method to do reservation for 1G page size, but it
may fail. For an EFI platform, you may skip 1G page reservation
by using a 2M page, but make sure your huge page reservation size is
large enough for your usage.
2) Start ``acrn-dm`` *with* the ``-T`` option.