gpu resource multiplexing in component based systems
play

GPU-resource multiplexing in component-based systems Sebastian - PowerPoint PPT Presentation

GPU-resource multiplexing in component-based systems Sebastian Sumpf < sebastian.sumpf@genode-labs.com > Josef Sntgen < josef.soentgen@genode-labs.com > Outline 1. Motivation 2. State of the art 3. GPU resource multiplexing in


  1. GPU-resource multiplexing in component-based systems Sebastian Sumpf < sebastian.sumpf@genode-labs.com > Josef Söntgen < josef.soentgen@genode-labs.com >

  2. Outline 1. Motivation 2. State of the art 3. GPU resource multiplexing in user space 4. Results 5. References GPU-resource multiplexing in component-based systems 2

  3. Outline 1. Motivation 2. State of the art 3. GPU resource multiplexing in user space 4. Results 5. References GPU-resource multiplexing in component-based systems 3

  4. Motivation GPU-resource multiplexing in component-based systems 4

  5. Motivation Architecture layout of an Intel Core i7 6700K processor 1 1https://software.intel.com/sites/default/files/managed/c5/9a/The-Compute-Architecture-of-Intel-Processor- Graphics-Gen9-v1d0.pdf GPU-resource multiplexing in component-based systems 5

  6. Motivation GPUs have become freely programmable, think shader language, CUDA/OpenCL 2 2https://www.shadertoy.com/view/ldlcRf GPU-resource multiplexing in component-based systems 6

  7. GPU machine code 3 3https://twitter.com/adamjmiles/status/821914849038966784 GPU-resource multiplexing in component-based systems 7

  8. Maybe operating systems → should handle GPUs in a way like they do it for CPUs GPU-resource multiplexing in component-based systems 8

  9. Outline 1. Motivation 2. State of the art 3. GPU resource multiplexing in user space 4. Results 5. References GPU-resource multiplexing in component-based systems 9

  10. State of the art GPU-resource multiplexing in component-based systems 10

  11. Complexity analysis (Intel only) Mesa library Mesa KLOC EGL 7.5 OpenGL 170 GLSL 90 i965 DRI driver 81 i915 driver ~100 KLOC GPU-resource multiplexing in component-based systems 11

  12. Port Mesa with software rendering back end GPU-resource multiplexing in component-based systems 12

  13. Or this GPU-resource multiplexing in component-based systems 13

  14. Until GPU-resource multiplexing in component-based systems 14

  15. 3D software stack on Linux GPU-resource multiplexing in component-based systems 15

  16. 3D software stack on Linux 1. Observation while investigating the i915 GPU driver from Linux ◮ A lot of code to support previous IGD generations ◮ Support for many outdated features 2. Idea → Support current hardware generations (i. e., Broadwell and newer) only → Take advantage of modern features → Try to write a minimal GPU multiplexer from scratch GPU-resource multiplexing in component-based systems 16

  17. GPU resource multiplexing on Linux GPU-resource multiplexing in component-based systems 17

  18. Engines 1. Render engine (3D/GPGPU) 2. VCS engine (Video Command Streamer - video decode support) 3. VECS engine (Video Enhancement Command Streamer) 4. Blitter engine → Concentrate on render engine GPU-resource multiplexing in component-based systems 18

  19. Resource management by the GPU driver 4 4 https://image.slidesharecdn.com/19gscale1-160901124550/95/xpds16-live-scalability-for-vgpu-using-gscale- xiao-zheng-intel-5-638.jpg?cb=1472733989 GPU-resource multiplexing in component-based systems 19

  20. GGTT and PPGTT Global Graphics Translation Table (GGTT) ◮ Only one per GPU ◮ One level (8MB) ◮ 8 Byte page table entries (PTEs) point to 4KB physical pages ◮ The leading PTEs directly map into the aperture Per-process GTT (PPGTT) ◮ Hierarchical page table in various formats ◮ Gen8+ supports four level page table format ◮ 48 bit virtual-address space GPU-resource multiplexing in component-based systems 20

  21. Aperture and fence registers Aperture ◮ Only way for way CPU to access graphics memory directly ◮ Mapped through the GTT ◮ Up to 512MB on Broadwell/Skylake Fence registers ◮ Allow to set tiling mode (X or Y) for memory area mapped through the aperture (automatic tiling/detiling on write/read access by the CPU) ◮ 32 registers on Broadwell/Skylake GPU-resource multiplexing in component-based systems 21

  22. Ring management Physical and logical rings GPU-resource multiplexing in component-based systems 22

  23. Command execution 1. Classical ring execution by setting the head 2. Execlists ◮ Hardware status page ◮ Register state context ◮ PPGTT context ◮ Logical-ring context ◮ HW/engine context GPU-resource multiplexing in component-based systems 23

  24. Outline 1. Motivation 2. State of the art 3. GPU resource multiplexing in user space 4. Results 5. References GPU-resource multiplexing in component-based systems 24

  25. GPU resource multiplexing in user space GPU-resource multiplexing in component-based systems 25

  26. GPU resource multiplexing in user space GPU-resource multiplexing in component-based systems 26

  27. And of course GPU-resource multiplexing in component-based systems 27

  28. Something new GPU-resource multiplexing in component-based systems 28

  29. Component based scenario GPU-resource multiplexing in component-based systems 29

  30. Outline 1. Motivation 2. State of the art 3. GPU resource multiplexing in user space 4. Results 5. References GPU-resource multiplexing in component-based systems 30

  31. Results Trusted computing base Component KLOC Microkernel 10 Genode base system < 30 Nitpicker GUI server 5 GPU multiplexer 10 GPU-resource multiplexing in component-based systems 31

  32. State Current state Support for Mesa-based GPU clients Future Take advantage of the blitter engine Skylake, Kaby Lake, ... Future (tempting) work Virtual GPU in VirtualBox as GPU client GPU-resource multiplexing in component-based systems 32

  33. Outline 1. Motivation 2. State of the art 3. GPU resource multiplexing in user space 4. Results 5. References GPU-resource multiplexing in component-based systems 33

  34. References Intel’s open source community : https://01.org Ben Widawsky : https://bwidawsk.net/blog/index.php/ 2015/09/gen-graphics-and-the-urb Daniel Vetter : http://blog.ffwll.ch/2012/10/i915gem-crashcourse.html GPU-resource multiplexing in component-based systems 34

  35. Demo GPU-resource multiplexing in component-based systems 35

Recommend


More recommend