Skip to content

Commit 91f7391

Browse files
dbkinderlijinxia
authored andcommitted
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>
1 parent 6e15824 commit 91f7391

File tree

2 files changed

+36
-37
lines changed

2 files changed

+36
-37
lines changed

doc/getting_started/index.rst

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,42 @@ Set up Reference UOS
311311
:name: gsg-successful-boot
312312

313313

314+
Device Manager memory allocation mechanism
315+
==========================================
316+
317+
There are two Device Manager memory allocation mechanisms available:
318+
319+
- Contiguous Memory Allocator (CMA), and
320+
- Huge Page Tables (HugeTLB). HugeTLB is the default.
321+
322+
To choose CMA, do the following:
323+
324+
1) Add ``cma=reserved_mem_size@recommend_memory_offset-0``, (for example
325+
``cma=2560M@0x100000000-0``) to the SOS cmdline in ``acrn.conf``
326+
327+
2) Start ``acrn-dm`` *without* the ``-T`` option
328+
329+
To support HugeTLB, do the following:
330+
331+
1) Do huge page reservation
332+
333+
- For 1G huge page reservation, add ``hugepagesz=1G hugepages=reserved_pg_num``
334+
(for example, ``hugepagesz=1G hugepages=4``) to the SOS cmdline in
335+
``acrn.conf`` (for EFI)
336+
337+
- For 2M huge page reservation, after the SOS starts up, run the
338+
command::
339+
340+
echo reserved_pg_num > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
341+
342+
.. note::
343+
You can use 2M reserving method to do reservation for 1G page size, but it
344+
may fail. For an EFI platform, you may skip 1G page reservation
345+
by using a 2M page, but make sure your huge page reservation size is
346+
large enough for your usage.
347+
348+
2) Start ``acrn-dm`` *with* the ``-T`` option.
349+
314350
Build ACRN from Source
315351
**********************
316352

doc/primer/index.rst

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -936,40 +936,3 @@ or
936936
.. code-block:: bash
937937
938938
screen /dev/pts/0
939-
940-
941-
Device Manager memory allocation mechanism
942-
******************************************
943-
944-
There are two Device Manager memory allocation mechanisms available:
945-
946-
- Contiguous Memory Allocator (CMA), and
947-
- Huge Page Tables (HugeTLB). HugeTLB is the default.
948-
949-
To choose CMA, do the following:
950-
951-
1) Add ``cma=reserved_mem_size@recommend_memory_offset-0``, (for example
952-
``cma=2560M@0x100000000-0``) to the SOS cmdline in ``acrn.conf``
953-
954-
2) Start ``acrn-dm`` *without* the ``-T`` option
955-
956-
To support HugeTLB, do the following:
957-
958-
1) Do huge page reservation
959-
960-
- For 1G huge page reservation, add ``hugepagesz=1G hugepages=reserved_pg_num``
961-
(for example, ``hugepagesz=1G hugepages=4``) to the SOS cmdline in
962-
``acrn.conf`` (for EFI)
963-
964-
- For 2M huge page reservation, after the SOS starts up, run the
965-
command::
966-
967-
echo reserved_pg_num > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
968-
969-
.. note::
970-
You can use 2M reserving method to do reservation for 1G page size, but it
971-
may fail. For an EFI platform, you may skip 1G page reservation
972-
by using a 2M page, but make sure your huge page reservation size is
973-
large enough for your usage.
974-
975-
2) Start ``acrn-dm`` *with* the ``-T`` option.

0 commit comments

Comments
 (0)