2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-22 01:51:51 +00:00

34 Commits

Author SHA1 Message Date
Radostin Stoyanov
ede018176c make: remove checks for python 2 binary
This commit removes the checks for the Python 2 binary in the makefile
and makes sure that ZDTM tests always use python3. Since support for
Python 2 has been dropped, these checks are no longer needed.

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2023-10-22 13:29:25 -07:00
Radostin Stoyanov
b665dce3c7 docs: rename amdgpu_plugin.txt to criu-amdgpu-plugin.txt
By default, the file name 'amdgpu_plugin.txt' is used also as the name
for the corresponding man page (`man amdgpu_plugin`). However, when
this man page is installed system-wide it would be more appropriate
to have a prefix 'criu-' (e.g., `man criu-amdgpu-plugin`).

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2023-10-22 13:29:25 -07:00
Rajneesh Bhardwaj
55a5993bc7 criu/plugin: Support AMD ROCm Checkpoint Restore with KFD
To support Checkpoint Restore with AMDGPUs for ROCm workloads, introduce
a new plugin to assist CRIU with the help of AMD KFD kernel driver. This
initial commit just provides the basic framework to build up further
capabilities. Like CRIU, the amdgpu plugin also uses protobuf to
serialize
and save the amdkfd data which is mostly VRAM contents with some
metadata.
We generate a data file "amdgpu-kfd-<id>.img" during the dump stage. On restore
this file is read and extracted to re-create various types of buffer
objects that belonged to the previously checkpointed process. Upon
restore the mmap page offset within a device file might change so we use
the new hook to update and adjust the mmap offsets for newly created
target process. This is needed for sys_mmap call in pie restorer phase.
Support for queues and events is added in future patches of this series.

With the current implementation (amdgpu_plugin), we support:
     - Only compute workloads such (Non Gfx) are supported
     - GPU visible inside a container
     - AMD GPU Gfx 9 Family
     - Pytorch Benchmarks such as BERT Base

amdgpu plugin dependes on libdrm and libdrm_amdgpu which are typically
installed with libdrm-dev package. We build amdgpu_plugin only when the
dependencies are met on the target system and when user intends to
install the amdgpu plugin and not by default with criu build.

Suggested-by: Felix Kuehling <felix.kuehling@amd.com>
Co-authored-by: David Yat Sin <david.yatsin@amd.com>
Signed-off-by: David Yat Sin <david.yatsin@amd.com>
Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@amd.com>
2022-04-28 17:53:52 -07:00
Radostin Stoyanov
f2cdb062aa Makefile: install criu-ns only with python3
Python 2 has been deprecated since January 1, 2020 and linux distributions
already support Python 3. Thus, to simplify maintenance and packaging
we could support criu-ns as Python 3 only.

v2: Add a message for criu-ns installation

Signed-off-by: Radostin Stoyanov <radostin@redhat.com>
2021-10-12 12:58:43 -07:00
Radostin Stoyanov
f472e2590e Documentation: Add man page for criu-ns
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2021-09-03 10:31:00 -07:00
Kir Kolyshkin
8477875dc2 doc/Makefile: don't hide xmlto stderr
In case asciidoc is installed and xmlto is not, make returns an error
but there's no diagnostics shown, since "xmlto: command not found"
goes to /dev/null.

Remove the redirect.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2020-02-04 12:39:44 -08:00
Harshavardhan Unnibhavi
c797dae453 Documentation: Create man page for libcompel
Resolves #349

Signed-off-by: Harshavardhan Unnibhavi <hvubfoss@gmail.com>
2019-09-07 15:59:53 +03:00
Takashi Iwai
0493724c8e Documentation: Allow to use asciidoctor for formatting man pages
Since asciidoc is based on Phyton 2, we want to move to alternative,
and a promising one is asciidoctor.  This patch allows to use
asciidoctor for formatting man pages instead of asiidoc, by passing
a make option, USE_ASCIIDOCTOR=yes.

Although asciidoctor is almost compatible with asciidoc, it can
produce a man page directly from a text file without XML, which is
more efficiently.  So in asciidoctor mode, we don't require xmlto.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrei Vagin <avagin@gmail.com>
2019-04-20 20:25:26 -07:00
Takashi Iwai
f73e5d181b Documentation: Remove unused a2x check
a2x is never used although its presence is checked mandatorily.
Let's remove this superfluous check and the unused entry.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Dmitry Safonov <0x7f454c46@gmail.com>
Signed-off-by: Andrei Vagin <avagin@gmail.com>
2019-04-20 20:25:26 -07:00
Dmitry Safonov
cad611b360 Documentation/make: Call check before install
Let's warn about binary needed for `install` target.
Before:
[root@localhost criu]# make install
  GEN      crit.1
make[1]: *** [Makefile:49: crit.1] Error 127
make: *** [Makefile.install:32: install-man] Error 2

After:
[root@localhost criu]# make install
/bin/sh: line 1: xmlto: command not found
make[1]: *** [Makefile:32: check] Error 1
make: *** [Makefile.install:32: install-man] Error 2

Fixes: #481
Reported-by: treaki@gmail.com
Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-05-18 01:44:32 +03:00
Adrian Reber
d08622811d crit: added crit manpage
Based on debian's manpage from Salvatore Bonaccorso:

e708a3a Sync manpage for crit to include short explanation for new subcommands
7dd571a Fix position for optional arguments in crit's manpage
017f8d9 Add minimal manpage for the crit

travis-ci: success for crit: added crit manpage
Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-12-12 11:34:22 +03:00
Kir Kolyshkin
ca2cee201e doc/Makefile: fix deps
The "$(SRC): $(FOOTER)" dependency listed is incorrect, as criu.txt file
is not dependent on footer.txt. Having said that, criu.8 in fact do
depend on footer.txt but that was not reflected in Makefile. Fix it.

While at it, add the custom.xsl dependency, which was also missing.

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-10 12:48:20 +03:00
Kir Kolyshkin
9ca1db576b doc/Makefile: make sure CRIU_VERSION is defined
I just discovered that if I run make right from Documentation/ subdir,
CRIU_VERSION is not defined so the generated man page is lacking it.

Let's fix by conditionally including ../Makefile.versions.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-10 12:48:20 +03:00
Kir Kolyshkin
9e2ce61cac Makefile nitpicks
1. As __nmk_dir already ends with a slash, there's no need
   for an extra one.

2. No need to include macro.mk into criu/Makefile -- nothing it defines
   is used from there.

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-05 13:11:26 +03:00
Kir Kolyshkin
5c6817349d Documentation: prettify the man page
This adds a way to re-enable justification and hyphenation for
the man page (which in enabled by default in troff but then
Docbook explicitly disables it). The man page looks better this way.

The reason why hyphenation for man pages is disabled by Docbook is
"The problem is that groff is not particularly smart about how it
does hyphenation; it can end up hyphenating a lot of things that you
don't want hyphenated".

The reason why justification for man pages is disabled by Docbook is
"justified text looks good only when it is also hyphenated.
Without hyphenation, excessive amounts of space often end up
getting between words, in order to "pad" lines out to align
on the right margin".

I carefully checked the resuling man page using both terminal output
on 80 columns and the PS/PDF generated. In both cases hyphenation
looks normal, i.e. I don't see any unwanted cases of extra hyphenation.
Same for justification.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-27 17:06:02 +03:00
Kir Kolyshkin
4edc7c9cb2 Documentation/Makefile: set nmkdir
I was not able to find a way to make a target in sub-makefile
(such as "cd Documentation && make pdf") without this hack.

If there's a better way, please let me know

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-27 17:06:02 +03:00
Cyrill Gorcunov
3276406d65 build: Add uninstall action
While most are handled from the scratch there is a significant
problem with python setup. So I added some preliminaty solution,
probably someohe with good knowledge of how setup.py works
improve it later.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-04-27 14:13:35 +03:00
Cyrill Gorcunov
6fe502dc80 build: docs -- Use autogenerated footer
We can generate footer dynamically and
provide criu.8 version the same as
the program has.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-03-21 10:15:31 +03:00
Cyrill Gorcunov
db6cb69394 build: Move everything criu related into criu directory
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-02-15 15:32:45 +03:00
Adrian Reber
35763e0b50 Makefile: fix libcriu.so links and man page installation
The links to the versioned libcriu.so.* included $(DESTDIR) and
$(LIBDIR) which will generate wrong links if building criu packages.
Now the links points to the correct file without any path.

For some reason criu.8 was installed with executable permission. Use
'install' with '-m 644' to make sure this does not happen.

Signed-off-by: Adrian Reber <adrian@lisas.de>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2014-02-10 14:27:43 +04:00
Kir Kolyshkin
071312d9d5 Doc/Makefile: error out if req tools absent
Make sure we have a clear message why build it failing, as there are
repeated questions at criu@ mailing list.

Before this patch:

	[kir@kirpad Documentation]$ make
	  GEN      criu.8
	make: *** [criu.8] Error 127

After:

	[kir@kirpad Documentation]$ make
	/bin/sh: line 1: xmltos: command not found
	make: *** [check] Error 1

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2014-01-20 14:53:54 +04:00
Kir Kolyshkin
19ea709e1a Doc/Makefile: add ps and pdf generation
It can be handful to check how a man page looks in PDF or Postscript.
Use 'make ps' and 'make pdf' to generate one.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2014-01-11 09:16:40 +04:00
Kir Kolyshkin
5e10cb7319 Doc/Makefile: make clean less greedy
Only remove the files which we explicitly generate.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2014-01-11 09:16:28 +04:00
Kir Kolyshkin
0bc01e798c Documentation/Makefile: fix clean target
...after commit 1e1bf24

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-05-10 11:01:57 +04:00
Kir Kolyshkin
e516aa0122 Makefiles: add install target
Note to package maintainers:

1 Yes we do support DESTDIR.

2 From packaging scripts, use something like this:

	make install DESTDIR=$RPM_BUILD_ROOT PREFIX=/usr

(v2: add PREFIX, install to /usr/local not /usr by default)
(v3: fix criu man section -- it is 8 not 1)

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-05-03 01:56:30 +04:00
Kir Kolyshkin
1e1bf240e6 criu(1): moved to criu(8)
This command is for root, so section 8 of manual is
more appropriate than 1.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-05-02 22:42:01 +04:00
Kir Kolyshkin
7e43957602 Documentation: rename crtools(1) to criu(1)
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-05-02 22:38:36 +04:00
Kir Kolyshkin
d32db87462 Doc/Makefile: mark clean target as phony
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-05-02 22:32:34 +04:00
Kir Kolyshkin
04158bda8f Doc/Makefile: don't build Makefile.build man
This is developers documentation, I doubt any user of crui
is interested in that. So let's not build it by default.

It can still be built manually:

make -C Documentation Makefile.build.1

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-05-02 22:32:27 +04:00
Cyrill Gorcunov
44faee19c1 make: docs -- Append manpages generation
I occasionally used assignments instead of
appending manpages for generation. Fix it.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-02-18 18:42:07 +04:00
Cyrill Gorcunov
16c75274a1 docs: Add documentation about scritps/Makefile.build
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-02-18 18:10:42 +04:00
Cyrill Gorcunov
3876cadad1 make: docs -- Use Makefile.inc
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-02-01 15:12:19 +04:00
Cyrill Gorcunov
7a7315d09b make: Fix Documentation/Makefile to not rebuild man without change
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-02-01 15:12:02 +04:00
Cyrill Gorcunov
17a4a6cd09 docs: Initial commit
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-29 00:09:32 +04:00