Commit Graph

7 Commits

Author SHA1 Message Date
Harri Syrjä
1d8e10dc17 lint issues fixed 2023-11-17 11:36:49 +02:00
Harri Syrjä
6b9b3c4cdf Xelink support with all changes 2023-11-15 16:17:03 +02:00
Ukri Niemimuukko
7ed30b2c4e gpu_fakedev: better dra support
This adds generation of the sys/bus folder files, so that dra
can use the generated files to an extent.

Signed-off-by: Ukri Niemimuukko <ukri.niemimuukko@intel.com>
2023-09-06 17:16:27 +03:00
Eero Tamminen
5d62c8e29f Fix typo in gpu_fakedev example config
Signed-off-by: Eero Tamminen <eero.t.tamminen@intel.com>
2022-12-12 15:56:30 +02:00
Eero Tamminen
9d4b52188e Add "gpu_fakedev" documentation
Signed-off-by: Eero Tamminen <eero.t.tamminen@intel.com>
2022-08-26 19:05:10 +03:00
Eero Tamminen
cc3aebbefc Add minimal example JSON to test "gpu_fakedev" generator
Config file is suitably indented so that it can be directly
appended to a suitable configMap header.

Signed-off-by: Eero Tamminen <eero.t.tamminen@intel.com>
2022-08-26 19:05:10 +03:00
Eero Tamminen
c15feea1f8 Add code for generating fake GPU sysfs + devfs files
To facilitate GPU plugin scalability testing on a real cluster.

Pre-existing (fake) sysfs & devfs content needs to be removed first:

* Fake devfs directory is mounted from host so OCI runtime can "mount"
  device files also to workloads requesting fake devices. This means
  that those files can persist over fake GPU plugin life-time, and
  earlier files need to be removed, as they may not match

* DaemonSet restarts failing init containers, so errors about content
  created on previous generator run would prevent getting logs of the
  real error on first generator run

* Before removal, check that removed directory content is as expected,
  to avoid accidentally removing host sysfs/devfs content (in case
  container was erronously granted access to the real thing)

Container runtime requires fake device files to real be devices:

* Use NULL devices to represent fake GPU devices:
  https://www.kernel.org/doc/Documentation/admin-guide/devices.txt

* Give more detailed logging for MkNod() failures as device
  node creation is most likely operation to fail when container
  does not have the necessary access rights

Created content is based on JSON config file (instead of e.g.
commandline options) so that (configMap providing) it can be updated
independently of the pod where generator is run.

Signed-off-by: Eero Tamminen <eero.t.tamminen@intel.com>
2022-08-26 19:04:43 +03:00