Skip to content

Commit

Permalink
vng: improve documentation of the new option --numa
Browse files Browse the repository at this point in the history
Improve command line help for --numa and add an example to README.md.

Signed-off-by: Andrea Righi <[email protected]>
  • Loading branch information
Andrea Righi committed Jan 31, 2024
1 parent e2634de commit 4381750
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,23 @@ Examples
Linux version 6.7.0-060700rc5-generic (kernel@kathleen) (x86_64-linux-gnu-gcc-13 (Ubuntu 13.2.0-7ubuntu1) 13.2.0, GNU ld (GNU Binutils for Ubuntu) 2.41) #202312102332 SMP PREEMPT_DYNAMIC Sun Dec 10 23:41:31 UTC 2023
```

- Run the current kernel creating a 1GB NUMA node with CPUs 0,1,3 assigned
and a 3GB NUMA node with CPUs 2,4,5,6,7 assigned:
```
$ vng -r -m 4G --numa 1G,cpus=0-1,cpus=3 --numa 3G,cpus=2,cpus=4-7 -- numactl -H
available: 2 nodes (0-1)
node 0 cpus: 0 1 3
node 0 size: 1005 MB
node 0 free: 914 MB
node 1 cpus: 2 4 5 6 7
node 1 size: 2916 MB
node 1 free: 2797 MB
node distances:
node 0 1
0: 10 20
1: 20 10
```

- Run `glxgears` inside a kernel recompiled in the current directory:
```
$ vng -g -- glxgears
Expand Down
5 changes: 4 additions & 1 deletion virtme_ng/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,10 @@ def make_parser():
"--numa",
metavar="MEM[,cpus=FIRST_CPU1[-LAST_CPU1]][,cpus=FIRST_CPU2[-LAST_CPU2]]...",
action="append",
help="Create NUMA nodes in the guest (this implicitly disables the microvm architecture)"
help="Create a NUMA node in the guest. "
+ "Use this option multiple times to create more NUMA nodes. "
+ "The total memory size assigned to NUMA nodes must match the guest memory size (specified with --memory/-m). "
+ "This option implicitly disables the microvm architecture."
)

parser.add_argument(
Expand Down

0 comments on commit 4381750

Please sign in to comment.