Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
472a42b9
"example/19_binary_elementwise/elementwise_add_1d.cpp" did not exist on "9f71ff48e28709c8132735d80af57ec90626d4b5"
Commit
472a42b9
authored
Apr 05, 2024
by
Jonas Kaufmann
Committed by
Antoine Kaufmann
Apr 08, 2024
Browse files
README, docs: clearly document how to avoid gem5 perf attach panic
parent
fa20c8b8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
6 deletions
+38
-6
README.md
README.md
+10
-5
doc/simulators/gem5.rst
doc/simulators/gem5.rst
+2
-1
doc/user/troubleshooting.rst
doc/user/troubleshooting.rst
+26
-0
No files found.
README.md
View file @
472a42b9
...
...
@@ -58,21 +58,26 @@ dependencies. This command will run an interactive shell in a new ephemeral
container (deleted after the shell exits):
```
Shell
docker run --rm -it simbricks/simbricks /bin/bash
docker run --rm -it
--device /dev/kvm --privileged
simbricks/simbricks /bin/bash
```
If you are running on a Linux system with KVM support enabled, we recommend
passing
`/dev/kvm`
into the container to drastically speed up some of the
simulators:
simulators. It is even required for some of them, e.g. gem5.
Further, if you plan to use gem5, the container needs to be started with
`--privileged`
since it requires access to the
`perf_event_open`
syscall. In
addition,
`/proc/sys/kernel/perf_event_paranoid`
has to to be set to 1 or lower
on your host system. You can do so with
```
Shell
docker run --rm -it --device /dev/kvm simbricks/simbricks /bin/bash
sudo sysctl -w kernel.perf_event_paranoid=1
```
Finally, some of our host simulators, e.g.
,
gem5 and Simics, require raw
Finally, some of our host simulators, e.g. gem5 and Simics, require raw
disk images. Since Docker doesn't handle large, sparse files well leading to
large Docker image sizes, we only include disk images in the qcow format. To
convert these to raw, run the following:
convert these to raw, run the following
inside the container
:
```
Shell
make convert-images-raw
...
...
doc/simulators/gem5.rst
View file @
472a42b9
...
...
@@ -119,4 +119,5 @@ Usage Notes
will fail with an error and not silently fall back to something slower.
* gem5-kvm configurations require ``/proc/sys/kernel/perf_event_paranoid`` to
be set to ``-1`` on the host system.
be set to ``1`` or lower on the host system. :ref:`sec-gem5-perf` describes
how to do so.
doc/user/troubleshooting.rst
View file @
472a42b9
...
...
@@ -68,6 +68,32 @@ qcow images by running the following (again, requires QEMU to be built first):
$ make build-images-min
.. _sec-gem5-perf:
*********************************
gem5 Panic PerfKvmCounter::attach
*********************************
gem5 needs access to the syscall ``perf_event_open``. To allow access,
``/proc/sys/kernel/perf_event_paranoid`` has to be set to 1 or lower on the host
system. You can check the current value with
.. code-block:: bash
$ cat /proc/sys/kernel/perf_event_paranoid
To change the setting, use this command:
.. code-block:: bash
$ sudo sysctl -w kernel.perf_event_paranoid=1
If you are using SimBricks from within a Docker container, you also need to
start the container with the parameter ``--privileged`` for the
``perf_event_open`` syscall to be accessible. Our VS Code dev container is
configured to already do so, just start it as usual from within VS Code and you
are good to go. Otherwise, add the parameter to your ``docker run`` command.
************************************
Is My Simulation Stuck or Just Slow?
************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment